Auto increase column
1.
開啟青蛙
2.
點選Sequences
3.
在空白處按右鍵→Creat
Sequence
2.
輸入以下資料,按下OK即可,Sequence Name 請輸入你要的 ex: XXXXXX
3.
使用方式:
1.
"INSERT INTO Table VALUES(XXXXXX .NEXTVAL,
BrokerId , TermId, SeqNo, Stock, BSCode, MthQty, ’ MthPrice, SendFlag)"
Ex: "INSERT
INTO MATCH VALUES(XXXXXX .NEXTVAL,’9898’, ‘A’, ‘0001’,
‘2330’, ’B’, ‘30’, ’20.2’, 'F')";
2.取出目前櫃號:SELECT XXXXXX.CURRVAL FROM DUAL
3.取用一組新的值:SELECT XXXXXX. NEXTVAL FROM DUAL
6. 刪除Sequence
沒有留言:
張貼留言