WorksheetsRelational Database Management System
Total questions: 20
Worksheet time: 11mins
What SQL clause is used to restrict the rows returned by a query ?
WHEN
HAVING
FROM
WHERE
To remove duplicate rows from the result set of a select use the following keyword(s).
NO DUPLICATES
DISTINCT
UNIQUE
None of the above
MySQL runs on which operating systems ?
Linux and Mac OS-X only
Any operating system at all
Unix , Linux , Windows and others
Unix and Linux only
Which of the following can add a row to a table ?
Add
Insert
Update
Alter
Which SQL statement is used to insert new data in database ?
INSERT INTO
UPDATE
ADD
INSERT NEW
In a LIKE clause , you can could ask for any value ending in "qpt" by writing.
LIKE"%qpt"
LIKE"*ton"
LIKE"ton$"
LIKE^"ton$"
A NULL value is treated as a blank or 0.
True
False
None of the above
MySQL is
A Programming language
A Markup language
A technique for writing reliable programs
A Relational Database Management System
In a LIKE clause , you can ask for any 6 letter value by writing
LIKE ??????
LIKE .{6}
LIKE ...... (that's six dots)
LIKE ______ (that's six underscore characters)
The result of a SELECT statement can contain duplicate rows .
False
True
None of the above
Which of the following is not a valid aggregate function ?
COUNT
MIN
MAX
COMPUTE
What SQL clause is used to restrict the rows returned by a query depending on validity of two conditions simultaneously ?
AND
WHERE
HAVING
FROM
Primary key does allow the Null Values, whereas in Unique key doesn't accept the Null values . True or False ?
True
False
Which of the following commands should be used to create a database named "student" ?
CREATE?I student
CREATE DATABASE student
DATABASE /student
DATABASE student
Which one will delete the table data as well as table structure?
DELETE
DROP
The USE command ?
Is used to load code from another file
Has been deprecated and should be avoided for security reasons.
Is a pseudo name for the SELECT command
Should be used to choose the database you want to use once you've connected to MySQL.
A SELECT command without a WHERE clause returns ?
All records from a table that match the previous WHERE clause
All the records from a table , or information about all the records.
SELECT is invalid without a Where clause
Nothing
The table columns are also known as.....
Attributes
Fields
Records
Index
Key
The NULL keyword is used to :
Represent unknown value
represent a missing value
represent a positive infinity
represent 0 value
represent empty string
What is a foreign key ?
A foreign key is a key field in table , which relates the table to another table where the key is a primary key or unique key.
Constraint (reference integrity)
The foreign key is a column that can have NULL value
The foreign key is a column that can not have NULL values
