query insert data
INSERT INTO customer (custcode, custname, custaddr, postcode, city, state, hpno, email) VALUES
('C001', 'John Doe', '123 Elm Street', 12345, 'Springfield', 'Illinois', '555-1234',
'john.doe@example.com'),
('C002', 'Jane Smith', '456 Maple Avenue', 67890, 'Riverside', 'California', '555-5678',
'jane.smith@example.com'),
('C003', 'Emily Johnson', '789 Oak Drive', 11223, 'Brooklyn', 'New York', '555-9012',
'emily.j@example.com');
INSERT INTO item (itemcode, itemdesc, itemunit, sellingprice) VALUES
('I001', 'Widget A', 'Piece', 19.99),
('I002', 'Gadget B', 'Pack', 29.99),
('I003', 'Tool C', 'Set', 39.99);
INSERT INTO salesman (salesmanid, salesmanname) VALUES
('S001', 'Michael Brown'),
('S002', 'Sarah Taylor'),
('S003', 'David Wilson');
INSERT INTO tableorder (orderno, ordertype, orderdate, deliverydate, custcode, salesid) VALUES
(1001, 'Online', '2024-11-01', '2024-11-05', 'C001', 'S001'),
(1002, 'In-Store', '2024-11-02', '2024-11-06', 'C002', 'S002'),
(1003, 'Online', '2024-11-03', '2024-11-07', 'C003', 'S003');
INSERT INTO orderline (orderno, itemcode, orderqty, amount) VALUES
(1001, 'I001', 2, 39.98),
(1001, 'I002', 1, 29.99),
(1002, 'I003', 3, 119.97);
Comments
Post a Comment