Oracle database — Primary key ID Generating non repeating string functions sys_guid()

Prepare the pressure test server today , Ready to build 10W Data , But the primary key ID want Oracle Automatic database generation .

stay oracle8i A function for generating non duplicate data is provided later sys_guid() altogether 32 position , The main basis of generation is time and machine code , Unique in the world , be similar to java Medium UUID( They are the only ones in the world ).

Its application scenarios : When a field in the database is set to be unique , It can be generated automatically ( For example, the primary key );

Access method select sys_guid() from dual ;

Examples :
INSERT INTO “YG_IS”.“VIP_ACTUALSTORAGE_DETAIL” (“ID”, “STORAGENO”, “BARCODE”,
“PONO”, “AMOUNT”, “ACTUALAMOUNT”, “RETURNAMOUNT”, “DIFFERAMOUNT”, “CREATETIME”)
VALUES (sys_guid(), ‘2017031009-088’, ‘AF2U1345DU1AQ6230’, ‘2100118353’, ‘1’,
‘1’, ‘0’, ‘0’, TO_DATE(‘2017-03-14 16:45:27’, ‘SYYYY-MM-DD HH24:MI:SS’));

effect :

Technology
©2020 ioDraw All rights reserved
Interview questions : Handwritten list ( Include reverse linked list )C Notes on language learning —— Pointer : Pointer and one dimensional array error: (-215:Assertion failed) Solution layui.table Examples of dynamically getting header and list data python Simple record of network programming After the outbreak Which programming has a bright future Java Summary of basic learning (162)—— How to ensure thread safety ?vue el-input Do not enter special characters Only numbers can be entered Regular verification MYSQL database DML Common commands python in list and str Mutual conversion