CREATE TABLE `S` (`SNO` TEXT, `SNAME` TEXT, `STATUS` INT, `CITY` TEXT);
START TRANSACTION;
BEGIN;
INSERT INTO `S` VALUES ('S1', 'Smith', 20, 'London');
INSERT INTO `S` VALUES ('S2', 'Jones', 10, 'Paris');
INSERT INTO `S` VALUES ('S3', 'Blake', 30, 'Paris');
INSERT INTO `S` VALUES ('S4', 'Clark', 20, 'London');
INSERT INTO `S` VALUES ('S5', 'Adams', 30, 'Athens');
COMMIT;
Try this one out.
Edits:
- Changed
number
toINT
- Added semicolons (As Gabe mentioned)
- Added backticks around the table and column names
- Added Transaction (Speeds up
INSERT
queries, optional) - Removed quotes around the numbers (As christiandev mentioned)