Mysql Commands
Mysql Commands
USE class;
Show tables;
#WORKSHEET 1
create table Company(
cid INT primary key,
cname varchar(6),
ho varchar(9),
contact varchar(10)
);
# WORKSHEET 2
insert into activity values(1001, 'Relay 100x4', 'Star Annex', 16, 10000, '2004-01-
23');
insert into activity values(1002, 'High Jump', 'Star Annex', 10, 12000, '2003-12-
12');
insert into activity values(1003, 'Short Put', 'Super Power', 12, 8000, '2004-02-
14');
insert into activity values(1005, 'Long Jump', 'Star Annex', 12, 9000, '2004-01-
01');
insert into activity values(1008, 'Dicsus', 'Super Power', 16, 10000, '2004-01-
23');
# WORKSHEET 3
create table Student(
roll INT primary key,
name varchar(10),
mobile char(10),
stream varchar(15),
avg int,
class char(3)
);
## THINGS TO REMEMBER
semicolen
no comma for the last value
date as a string in yyyy-mm-dd format
DESC STUDENT;