0% found this document useful (0 votes)
19 views14 pages

Assignment: Shivam Saini

The document discusses various SQL queries performed on a database table named subjects including creating the database and table, inserting values, adding and removing columns, selecting distinct and conditional results based on columns, and printing results within a given range.

Uploaded by

Daniel Rizvi
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)
19 views14 pages

Assignment: Shivam Saini

The document discusses various SQL queries performed on a database table named subjects including creating the database and table, inserting values, adding and removing columns, selecting distinct and conditional results based on columns, and printing results within a given range.

Uploaded by

Daniel Rizvi
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/ 14

ASSIGNMENT

DBMS

SHIVAM SAINI
1954302076
MY

SQL
DBMS
CREATING
DATABASE
Database Name - Daniel_1954302105

CODE-

create database Daniel_1954302105;


INSERTING
VALUES into
Table Name - subjects
tables
CODE-
mentioned as above**
Adding a new
coloumn to
table
Table Name - subjects
CODE-
alter table subjects
add (grade varchar(99));
removing
column from
table
Table Name - subjects
CODE-
alter table subjects
drop grade;
printing particular
coloumn
from table
Table Name - subjects
CODE-
select name from subjects;
excluding
duplicates values
Table Name - subjects

CODE-
select distinct teacher from subjects;
conditional results
Table Name - subjects

CODE-

select name from subjects


where teacher = 'NageshSir';
giving range
on integers
values and
printing
CODE- results
select name from subjects
where (marks between 94 and 96);
giving range
on integers
values and
printing
CODE- results
select name from subjects
where (marks between 94 and 96);
general
terms I used
above

ALTER-
includes adding and dropping

INTEGER-
for declaring number datatype

VARCHAR-
for declaring text datatype

SELECT * FROM (TABLE_NAME)

FOR PRINTING RESULTS OR INGENERAL TABLE


general
terms I used
above

ALTER-
includes adding and dropping

INTEGER-
for declaring number datatype

VARCHAR-
for declaring text datatype

SELECT * FROM (TABLE_NAME)

FOR PRINTING RESULTS OR INGENERAL TABLE


SPECIAL THANKS TO NAGESH SIR
FOR HIS IMMENSE SUPPORT AND
TOP-NOTCH TEACHING.

All the tasks and practical perfomance has

been done on MacOS

shivam saini

THANKYOU
1954302076

You might also like