INSERT INTO table
(col_1,col_2,col_3)
SELECT '11111', '11111','111'
FROM dual
WHERE NOT EXISTS (SELECT * FROM table
WHERE PJ2701 = '11111')
UPDATE tableSET
col_3='123'
WHERE EXISTS (SELECT * FROM table
WHERE col_1= '11111')
AND col_1= '11111'
沒有留言:
張貼留言