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

SQL Notes & Ques

Uploaded by

Pritika Sachdeva
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

SQL Notes & Ques

Uploaded by

Pritika Sachdeva
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

GD GOENKA SIGNATURE SCHOOL, GURUGRAM

WORKSHEET – VI (SQL PROGRAMMING)

Ques 1: Consider the table, MOVIEDETAILS given below:

(a) Identify the degree and cardinality of the table.

(b) Which field should be made the primary key? Justify your answer.

Ques 2: Charu has to create a database named MYEARTH in MYSQL. She now needs to create a
table named CITY in the database to store the records of various cities across the globe. The table
CITY has the following structure:

Help her to complete the task by suggesting appropriate SQL commands.


Ques 3: In SQL, what is the use of NULL operator?

Ques 4: Which of the following is a DDL command? a) SELECT b) ALTER c) INSERT d) UPDATE

Ques 5: A departmental store MyStore is considering to maintain their inventory using SQL to
store the data. As a database administer, Abhay has decided that :

• Name of the database - mystore

• Name of the table - STORE

• The attributes of STORE are as follows:

ItemNo - numeric

ItemName – character of size 20

Scode - numeric

Quantity – numeric

(a) Identify the attribute best suitable to be declared as a primary key.

(b) Write the degree and cardinality of the table STORE.

Ques 6: Write the full forms of DDL and DML. Write any two commands of DML in SQL.

Ques 7: Write the syntax of creating table command.

Ques 8: Write the syntax of dropping table command.

Ques 9: Differentiate between delete and drop table command.

Ques 10: Write SQL query to add a column totalprice with data type numeric and size 10, 2 in a
table product.

You might also like