75 lines
1.9 KiB
Plaintext
75 lines
1.9 KiB
Plaintext
|
|
INSERT INTO suppliers
|
||
|
|
(supplier_id, supplier_name)
|
||
|
|
VALUES
|
||
|
|
(5000, 'Apple');
|
||
|
|
|
||
|
|
[@0,0:5='INSERT',<663>,1:0]
|
||
|
|
[@1,7:10='INTO',<685>,1:7]
|
||
|
|
[@2,12:20='suppliers',<2242>,1:12]
|
||
|
|
[@3,22:22='(',<2213>,2:0]
|
||
|
|
[@4,23:33='supplier_id',<2242>,2:1]
|
||
|
|
[@5,34:34=',',<2219>,2:12]
|
||
|
|
[@6,36:48='supplier_name',<2242>,2:14]
|
||
|
|
[@7,49:49=')',<2214>,2:27]
|
||
|
|
[@8,51:56='VALUES',<2064>,3:0]
|
||
|
|
[@9,58:58='(',<2213>,4:0]
|
||
|
|
[@10,59:62='5000',<2207>,4:1]
|
||
|
|
[@11,63:63=',',<2219>,4:5]
|
||
|
|
[@12,65:71=''Apple'',<2209>,4:7]
|
||
|
|
[@13,72:72=')',<2214>,4:14]
|
||
|
|
[@14,73:73=';',<2231>,4:15]
|
||
|
|
[@15,75:74='<EOF>',<-1>,5:0]
|
||
|
|
|
||
|
|
====================================================
|
||
|
|
|
||
|
|
INSERT INTO suppliers
|
||
|
|
(supplier_id, supplier_name)
|
||
|
|
SELECT (account_no, name)
|
||
|
|
FROM customers
|
||
|
|
WHERE customer_id > 5000;
|
||
|
|
|
||
|
|
[@0,0:5='INSERT',<663>,1:0]
|
||
|
|
[@1,7:10='INTO',<685>,1:7]
|
||
|
|
[@2,12:20='suppliers',<2242>,1:12]
|
||
|
|
[@3,22:22='(',<2213>,2:0]
|
||
|
|
[@4,23:33='supplier_id',<2242>,2:1]
|
||
|
|
[@5,34:34=',',<2219>,2:12]
|
||
|
|
[@6,36:48='supplier_name',<2242>,2:14]
|
||
|
|
[@7,49:49=')',<2214>,2:27]
|
||
|
|
[@8,51:56='SELECT',<1482>,3:0]
|
||
|
|
[@9,58:67='account_no',<2242>,3:7]
|
||
|
|
[@10,68:68=',',<2219>,3:17]
|
||
|
|
[@11,70:73='name',<873>,3:19]
|
||
|
|
[@12,75:78='FROM',<548>,4:0]
|
||
|
|
[@13,80:88='customers',<2242>,4:5]
|
||
|
|
[@14,90:94='WHERE',<2105>,5:0]
|
||
|
|
[@15,96:106='customer_id',<2242>,5:6]
|
||
|
|
[@16,108:108='>',<2228>,5:18]
|
||
|
|
[@17,110:113='5000',<2207>,5:20]
|
||
|
|
[@18,114:114=';',<2231>,5:24]
|
||
|
|
[@19,116:115='<EOF>',<-1>,6:0]
|
||
|
|
|
||
|
|
=============================================================
|
||
|
|
|
||
|
|
UPDATE customers
|
||
|
|
SET state = 'California',
|
||
|
|
customer_rep = 32
|
||
|
|
WHERE customer_id > 100;
|
||
|
|
|
||
|
|
[@0,0:5='UPDATE',<2016>,1:0]
|
||
|
|
[@1,7:15='customers',<2242>,1:7]
|
||
|
|
[@2,17:19='SET',<1501>,2:0]
|
||
|
|
[@3,21:25='state',<1566>,2:4]
|
||
|
|
[@4,27:27='=',<2233>,2:10]
|
||
|
|
[@5,29:40=''California'',<2209>,2:12]
|
||
|
|
[@6,41:41=',',<2219>,2:24]
|
||
|
|
[@7,47:58='customer_rep',<2242>,3:4]
|
||
|
|
[@8,60:60='=',<2233>,3:17]
|
||
|
|
[@9,62:63='32',<2207>,3:19]
|
||
|
|
[@10,65:69='WHERE',<2105>,4:0]
|
||
|
|
[@11,71:81='customer_id',<2242>,4:6]
|
||
|
|
[@12,83:83='>',<2228>,4:18]
|
||
|
|
[@13,85:87='100',<2207>,4:20]
|
||
|
|
[@14,88:88=';',<2231>,4:23]
|
||
|
|
[@15,90:89='<EOF>',<-1>,5:0]
|