wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

My SQL- DDL

Total questions: 20

Worksheet time: 11mins

Name
Class
Date
1.

What does "SQL" stand for?

a)

Structured Question Language

b)

Structured Query Language

c)

Simple Query Language

d)

Simple Question Language

2.

Less than or equal to?

a)

>=

b)

=>

c)

=<

d)

<=

3.

DDL means

(a)  

4.

DML

(a)  

5.

______________ constraint prevents NULL values

a)

UNIQUE

b)

NOT NULL

c)

NULL

d)

FOREIGN KEY

6.

A primary key can be NULL in the table? TRUE or FALSE

a)

TRUE

b)

FALSE

7.

Select DDL commands from among the options...

a)

SELECT

b)

ALTER

c)

DROP

d)

DELETE

8.

The restrictions or conditions applied on data for distinct value is known as (a)  

9.

The primary key of a table which is present in another table for referencing is known as (a)  

10.

The command which changes the structure of a table is (a)  

11.

Which constraint(s) can be used to make sure that the column is not left empty?

a)

NOT NULL

b)

UNIQUE

c)

PRIMARY KEY

d)

ALL THE ABOVE

12.

1.Which command is used to open a database Computer.

a)

a) Open database Computer;

b)

b) Open Computer;

c)

c) Use database Computer;

d)

d) Use Computer;

13.

Complete the SQL statement to create a new table called Persons

ـــــــــــــــــــــــــ (

PersonID int,

LastName varchar(255),

FirstName varchar(255),

Address varchar(255),

City varchar(255)

);

(a)  

14.

Write the correct SQL statement to create a new database called testDB


ــــــــــــــــــــــــــــــــــــــــــــــــــ ;

(a)  

15.

Add a column of type DATE called Birthday


ALTER TABLE Persons

ــــــــــــــــــــــــــــــ ;

(a)  

16.

1.Which command is used to see the structure of a database Google;

a)

a) Structure Google;

b)

b) Show Google;

c)

c) Display Google;

d)

d) desc Google;

17.

1.Which command is used to add a primary key on the table "Quiz" and column "Number".

a)

a) ALTER TABLE Quiz Modify Primary Key (Number);

b)

b) ALTER TABLE Number Modify Primary Key (Quiz);

c)

c) ALTER TABLE Quiz Add Primary Key (Number);

d)

d) ALTER Quiz ADD Primary Key (Number);

18.

1.Which Command is used to remove the table named Book from the Database.

a)

a) ALTER TABLE Remove Book;

b)

b) REMOVE TABLE BOOK;

c)

c) ALTER TABLE BOOK DROP BOOK;

d)

d) DROP TABLE BOOK;

19.

1.Which Command is used to increase the size of the column EADDRESS to varchar- 30 table named Emp of Database company.

a)

a) Increase Varchar(30) EADDRESS;

b)

b) ALTER TABLE EMP MODIFY EADDRESS VARCHAR(30);

c)

c) ALTER TABLE COMPANY MODIFY EADDRESS VARCHAR(30);

d)

d) ALTER TABLE EMP ADD EADDRESS VARCHAR(30);

20.

Command to see the list of all the tables of a database.

(a)