Font size
WorksheetsMy SQL- DDL
Total questions: 20
Worksheet time: 11mins
What does "SQL" stand for?
Structured Question Language
Structured Query Language
Simple Query Language
Simple Question Language
Less than or equal to?
>=
=>
=<
<=
DDL means
(a)
DML
(a)
______________ constraint prevents NULL values
UNIQUE
NOT NULL
NULL
FOREIGN KEY
A primary key can be NULL in the table? TRUE or FALSE
TRUE
FALSE
Select DDL commands from among the options...
SELECT
ALTER
DROP
DELETE
The restrictions or conditions applied on data for distinct value is known as (a)
The primary key of a table which is present in another table for referencing is known as (a)
The command which changes the structure of a table is (a)
Which constraint(s) can be used to make sure that the column is not left empty?
NOT NULL
UNIQUE
PRIMARY KEY
ALL THE ABOVE
1.Which command is used to open a database Computer.
a) Open database Computer;
b) Open Computer;
c) Use database Computer;
d) Use Computer;
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)
Write the correct SQL statement to create a new database called testDB
ــــــــــــــــــــــــــــــــــــــــــــــــــ ;
(a)
Add a column of type DATE called Birthday
ALTER TABLE Persons
ــــــــــــــــــــــــــــــ ;
(a)
1.Which command is used to see the structure of a database Google;
a) Structure Google;
b) Show Google;
c) Display Google;
d) desc Google;
1.Which command is used to add a primary key on the table "Quiz" and column "Number".
a) ALTER TABLE Quiz Modify Primary Key (Number);
b) ALTER TABLE Number Modify Primary Key (Quiz);
c) ALTER TABLE Quiz Add Primary Key (Number);
d) ALTER Quiz ADD Primary Key (Number);
1.Which Command is used to remove the table named Book from the Database.
a) ALTER TABLE Remove Book;
b) REMOVE TABLE BOOK;
c) ALTER TABLE BOOK DROP BOOK;
d) DROP TABLE BOOK;
1.Which Command is used to increase the size of the column EADDRESS to varchar- 30 table named Emp of Database company.
a) Increase Varchar(30) EADDRESS;
b) ALTER TABLE EMP MODIFY EADDRESS VARCHAR(30);
c) ALTER TABLE COMPANY MODIFY EADDRESS VARCHAR(30);
d) ALTER TABLE EMP ADD EADDRESS VARCHAR(30);
Command to see the list of all the tables of a database.
(a)
