SQL Commands
1. To create a table :
a) create table employee(id integer not null auto_increment primary key, name text, address
text not null, department text, basic double(8,2));
2. To delete a table :
a) drop table employee;
3. To insert data in a table :
a) insert into employee(name, address, department, basic) values('SAM', 'Kol-91', 'IRD',
19007.50);
4. Delete all the data from table :
a) delete from employee;
5. Delete a specific data from table :
a) delete from employee where id=100;
6. Selecting all data from table :
a) select * from employee;
7. Selecting a specific data from table :
a) select * from employee where id=100;
b) select * from employee where id=100 or id=400;
c) select * from employee where id>=200 and basic>=10000;
8. Selecting specific field from table :
Globsyn Skills Development (P) Ltd
XI – 11 & 12, Block EP, Sector V, Globsyn Crystals, Salt Lake Electronics Complex,
Kolkata – 700091, West Bengal (India)
Phone: +91-33-6453 0005 / 84201 68488 • Fax: +91-33-23573684
Web: [Link] • e-mail: skills4india@[Link]
a) select id, name, basic from employee where id=100;
9. Update a specific data of a column in a table :
a) update employee set address='Kol-78' where id=100;
b) update employee set basic=basic+500 where id=100;
Globsyn Skills Development (P) Ltd
XI – 11 & 12, Block EP, Sector V, Globsyn Crystals, Salt Lake Electronics Complex,
Kolkata – 700091, West Bengal (India)
Phone: +91-33-6453 0005 / 84201 68488 • Fax: +91-33-23573684
Web: [Link] • e-mail: skills4india@[Link]