CREATE DATABASE act; CREATE TABLE Products ( Code int not null, Name varchar(20) not null, Price int not null, Manufacturer int not null, PRIMARY KEY (Code) ); begin INSERT INTO Products VALUES (1, 'Hard drive', 240, 5); INSERT INTO Products VALUES (2, 'Memory', 120, 6); INSERT INTO Products VALUES (3, 'ZIP drive', 150, 4); INSERT INTO Products VALUES (4, 'Floppy disk', 5, 6); INSERT INTO Products VALUES (5, 'Monitor', 240, 1); INSERT INTO Products VALUES (6, 'DVD drive', 180, 2); INSERT INTO Products VALUES (7, 'CD drive', 90, 2); INSERT INTO Products VALUES (8, 'Printer', 270, 3); INSERT INTO Products VALUES (9, 'Toner cartridge', 66, 3); INSERT INTO Products VALUES (10, 'DVD burner', 180, 2); end; SELECT * FROM Products;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter