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

SQL DDL Test

The document outlines 15 SQL commands related to database, table, and column creation, manipulation, and deletion. It provides instructions to create databases and tables with fields and constraints, display table structures, modify table columns, add and remove primary keys, and delete tables and databases.

Uploaded by

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

SQL DDL Test

The document outlines 15 SQL commands related to database, table, and column creation, manipulation, and deletion. It provides instructions to create databases and tables with fields and constraints, display table structures, modify table columns, add and remove primary keys, and delete tables and databases.

Uploaded by

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

CLASS: XII TOPIC: SQL (DDL) DATE: 13.09.

2023

NAME: ___________________________ MAX MARKS: 15

1. Display existing databases in the mysql dbms

2. Create a database named school.

3. Open database created above.

4. Display existing tables in the above selected database

5. Create a table teacher with following fields and appropriate constraints


Teacherno#, tname, desg, salary

6. Create a table student with following fields and appropriate constraints


Rollno#, name, age, class, teacherno
(Note: teacherno should take reference from teacher table i.e. it should be a foreign key)

7. Display the structures of both tables

8. Add a new column section to the student table


9. change the size of column tname to 40 in teacher table

10. rename the column desg to job

11. delete the column salary from teacher table

12. delete the primary key on student table

13. add a new column admno to student. Also make this column as primary key

14. delete both tables from the database

15. remove the database as well

You might also like