Contains information about Teradata,BTEQ,FASTLOAD,FASTEXPORT, Oracle Pl/SQL,forms, JAVA open source related topics and discussions
Oracle forms and reports
  Oracle database 

01 May 2009

Generating unique identifiers

     In web applications it is required to use unique id in certain columns in the tables, so that it does not getsrepeated. It is possible to generate unique identifiers in PL/SQL using a built in named SYS_GUID.

This builtin generates a 32 chracter length identifier, which can be used as a primary key in a column.

SQL> begin
2 dbms_output.put_line('sys_guid');
3 dbms_output.put_line('--------');
4 dbms_output.put_line(sys_guid);
5 end;
6 /

PL/SQL procedure successfully completed

No comments:

Post a Comment