0% found this document useful (0 votes)
3 views

SQL_1

SQL TABLE CREATING
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

SQL_1

SQL TABLE CREATING
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SQL

Create database < Database name>;


Create database XII;
Use < Database name>;
Use xii;

create table students


(
rollno integer Primary Key,
name varchar(20) not null,
age integer,
class varchar(8),
fee integer,
dob date,
sex char(1),
per integer,
city varchar(20)
);

Insert Command

SQL> insert into <table name> values ( value1, value2, value3, value4,value5,………);

Example
SQL> insert into students values ( 11101, 'Bhim',18, 'XI-A',3000, ’2002-04-08', ’M’,86, 'satna');

rollno name age class fee dob sex Per city


11101 Bhim 18 XI-A 3000 2002-04-08 M 86 Satna
11102 Rani 18 XI-A 1800 2002-05-07 F 75 Rewa
11103 Bharat 18 XI-A 3000 2002-04-18 M 86 Katni
11104 Laxmi 17 XI-A 1800 2003-10-09 F 73 Rewa
11201 Vijay 18 XI-B 1800 2002-04-08 M 71 Satna
11202 Ramesh 18 XI-B 2700 2002-08-09 M 65 Rewa
11203 Pooja 18 XI-B 1800 2002-10-09 F 65 Rewa
11204 Prachi 17 XI-B 1950 2003-07-19 F 60 satna
12101 Ajay 19 XII-A 3000 2001-03-20 M 80 satna
12103 Laxman 20 XII-A 3150 2000-04-06 M 81 Katni
12104 Rajni 19 XII-A 3000 2001-06-06 F 79 Katni
12105 Ram 19 XII-A 3150 2001-07-24 M 71 Rewa
12106 Sachin 19 XII-A 3000 2001-08-10 M 73 satna
12107 Savita 20 XII-A 3150 2000-04-21 F 80 satna
12202 Ram 19 XII-B 2700 2001-05-05 M 65 rewa
12203 Sanjay 20 XII-B 2750 2000-02-03 M 72 Rewa
12204 Arti 20 XII-B 2700 2000-05-25 F 62 Katni
10101 Abha 16 X-A 2700 2004-05-25 F 62 satna
10102 Abhay 16 X-A 2700 2004-06-20 M 62 katni
10103 Priti 15 X-A 2700 2005-05-25 F 74 rewa
10104 Gopal 16 X-A 2700 2004-01-20 M 76 satna
10201 Asha 16 X-B 2700 2004-04-25 F 81 satna
10202 Sateesh 16 X-B 2700 2004-07-21 M 80 katni
10203 Arti 15 X-B 2700 2005-02-12 F 72 rewa

You might also like