Questions about**annotation segment in SQLPlus Worksheet (2004.12.15 essay)

xiaoxiao2021-03-06  45

Today, I found a special wemonious problem in Oracle 9i's SQLUSWORKSHEET, see the following statement, first clear the sys_object table, and then in this table in this table, execute it in the 5.7 version of Golden32: / * ===== ============================================== * / delete from Sys_Object ;

/ * Merchant * / - Merchant Groupinsert into sys_object ( "OBJECT_ID", "OBJECT_NAME", "MENU_ID", "OBJECT_TYPE", "OBJECT_USER", "PROCESS", "CREATE_USER", "CREATE_TS", "ITEM_SEQ", "OBJECT_SEQ ") VALUES ('m_mercgr', 'Merchant Group', 'M_Merc', 'W', 'A', 'Merchant / Mercgr_Browse.asp', 'System', Sysdate, 3, 4);

/ * MPS Operation * / insert into sys_object ( "OBJECT_ID", "OBJECT_NAME", "MENU_ID", "OBJECT_TYPE", "OBJECT_USER", "PROCESS", "CREATE_USER", "CREATE_TS", "ITEM_SEQ", "OBJECT_SEQ") VALUES ('m_oper', 'MPS Operation ", NULL,' M ',' A ',' ',' SYSTEM ', SYSDATE, 2, 5); - Payment AdjustmentInsert Into Sys_Object (" Object_ID "," Object_name ", "Menu_ID", "Object_Type", "Object_user", "Process", "Create_user", "Create_TS", "Item_Seq", "Object_SEQ") VALUES ('m_payadj', 'payment adjustment', 'm_oper', 'W' , 'A', 'Operation / Payadj_Browse.asp', 'System', Sysdate, 1, 6); CommIT; but when executed in Oracle 9i's SQLPLUSWORKSHEET, the prompts are like this: 3 lines have been deleted.

0 lines have been deleted.

It has created a row.

insert into sys_object ( "OBJECT_ID", "OBJECT_NAME", "MENU_ID", "OBJECT_TYPE", "OBJECT_USER", "PROCESS", "CREATE_USER", "CREATE_TS", "ITEM_SEQ", "OBJECT_SEQ") VALUES ( 'M_MERCGR', 'Merchant Group', 'M_Merc', 'W', 'A', 'Merchant / Mercgr_browse.asp', 'System', Sysdate, 3,4) * Error is located in Chapter 1: ORA-00001: Violation of unique constraints (HYH.PK_SYS_OBJECT) has been created 1 line.

It has created a row.

Submitted.

I am depressed, why is my statement mistake, I see that the error message is a replicated value in the PK field INSERT, I think half-day, epiphany! Worksheet is clearly me, the data I have delete, and the pk field is the object_id field, it is impossible to repeat, then take a closer look, find the problem, I obviously wrote a delete statement, but return Two delete information, is DELETE executing twice? If it is executed twice, then there is no data when the second execution is executed, so DELETE is 0, why did it execute twice? Look at the code, find a question: DELETE is later: / * Merchant * / Review PK error: Then also comment block: / * MPS Operation * / Is it / ** / ghost? Ok, try it, change the two comment blocks - start, then Run ..., normal ..., it is really mad at me, it is really / ** / problem, why is there no problem for this comment block? : / * ===================== * // * Object data * // * ================== === * / Note: There is still other statements before this block. Multiple tests have found that the annotation blocks directly with 26 English letters will cause Worksheet to re-execute the statement before the comment block! / * Size-lowerter letter * / actually seems to be: Such a note / * uppercase letters * / make SQLPlus Worksheet re-execute the command line in the buffer! I don't know if I wrote or I understand, anyway, my problem solves If you have any questions, try it yourself.

转载请注明原文地址:https://www.9cbs.com/read-80379.html

New Post(0)