Class 12 SQL Worksheet 1
Class 12 SQL Worksheet 1
1 The SELECT statement when combined with clause, returns records without repetition.
(A) DISTINCT (B) DESCRIBE (C) UNIQUE (D) NULL
2 Which function is used to display the total number of records from a table in a
database?
(A) total() (B) total(*) (C) return(*) (D) count(*)
4 Which of the following commands will remove the entire database from MYSQL?
(A) DELETE DATABASE (B) DROP DATABASE
(C) REMOVE DATABASE (D) ALTER DATABASE
5 is a non-key attribute, whose values are derived from the primary key of
some other table.
(A) Primary Key (B) Candidate Key (C) Foreign Key (D) Alternate Key
6
Which of the following statements is True?
a) There can be only one Foreign Key in a table.
b) There can be only one Unique key is a table
c) There can be only one Primary Key in a Table
d) A table must have a Primary Key
9
Which statement in MySql will display all the tables in a database?
a) SELECT * FROM TABLES; b) USE TABLES;
13
Which of the following statements is True?
a) There can be only one Foreign Key in a table.
b) There can be only one Unique key is a table
c) There can be only one Primary Key in a Table
d) A table must have a Primary Key
14
The SQL built-in function calculates the average of values in numeric columns.
(a) MEAN() (b)AVG() (c) AVERAGE() (d) COUNT()
15 When two conditions must both be true for the rows to be selected, the conditions are
separated by the SQL keyword
(a)ALL (b)IN (c)AND (d)OR
16 Explain the use of ‘Foreign Key’ in a Relational Database Management System. Give example
to support your answer
COUNT(*) COUNT(discount)
10 6
18
20 Differentiate between DELETE and DROP keywords used in MySQL,giving suitable example
for each