0% found this document useful (0 votes)
5 views1 page

IP Practical

The document contains SQL commands for creating a student information table, inserting multiple student records, deleting records with marks less than 40, updating marks for students with IDs greater than 20, and selecting specific student details based on marks and date of birth criteria. It includes various student attributes such as roll number, name, class, section, gender, date of birth, and marks. The commands demonstrate basic database operations including creation, insertion, deletion, updating, and querying data.

Uploaded by

Dipti Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views1 page

IP Practical

The document contains SQL commands for creating a student information table, inserting multiple student records, deleting records with marks less than 40, updating marks for students with IDs greater than 20, and selecting specific student details based on marks and date of birth criteria. It includes various student attributes such as roll number, name, class, section, gender, date of birth, and marks. The commands demonstrate basic database operations including creation, insertion, deletion, updating, and querying data.

Uploaded by

Dipti Gupta
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

CREATETABLESTUDENTINFO(

stud_rnoI
NTPRIMARYKEY,
nameVARCHAR( 20)NOTNULL,
cl
assI NTNOTNULL,
sectionCHAR(
1)NOTNULL,
genderVARCHAR(6)NOTNULL,
dobDATENOTNULL,
mar ksINTNOTNULL);

I
NSERTI NTOSTUDENTI NFO
VALUES(1,'
AarushShah',
11,'A'
,'
Mal e'
,'
2005- 01-22',100) ;
I
NSERTI NTOSTUDENTI NFO
VALUES(2,'
AadiAhuja'
,
11, '
B',
'
Mal e',
'
2005- 12-31',
90) ;
I
NSERTI NTOSTUDENTI NFO
VALUES(35,'
ManasGupt a',
11,'
B','
Mal e',
'
2005- 12-22',100);
I
NSERTI NTOSTUDENTI NFO
VALUES(43,'
Shrut
iAgarwal '
,
11,'C'
,'
Femal e'
,
'2005-05- 13',
40);
I
NSERTI NTOSTUDENTI NFO
VALUES(37,'
Manaswi Sharma' ,
12,'A'
,'
Femal e',
'2004- 06-23'
,50)
;
I
NSERTI NTOSTUDENTI NFO
VALUES(5,'
Bhanu'
,12,
'D'
,'
Femal e',
'
2004- 11-29',70);
I
NSERTI NTOSTUDENTI NFO
VALUES(6,'
RajShah',
11,
'C',
'
Mal e',
'
2005- 11-19',30);
I
NSERTI NTOSTUDENTI NFO
VALUES(19,'
SuparnaShar ma',
11,'C',
'
Femal e',
'2005- 05-17',
90);
I
NSERTI NTOSTUDENTI NFO
VALUES(26,'
Sahil
Ahuja'
,11,'
D',
'Mal e'
,'
2005-07- 18',
80) ;
I
NSERTI NTOSTUDENTI NFO
VALUES(23,'
RaghavGupt a'
,10,'
A',
'Mal e'
,'
2006- 06-16',20);

DELETEFROM STUDENTI
NFO
WHEREmar ks<40

UPDATESTUDENTI NFO
SETmarks=marks+(mar
ks*
5.00/
100.
00)
WHEREstud_r
no>20

SELECTstud_r
no,
name,
mar
ks
FROM STUDENTINFO
WHEREmar ks>50

SELECTstud_
rno,
name,
dob
FROM STUDENTINFO
WHEREdobBETWEEN' 2005-
01-
01'
AND'
2005-
12-
31'

You might also like