WorksheetsINTRO TO SQL
Total questions: 39
Worksheet time: 20mins
What does SQL stand for?
Standard Query Language
Sequential Query Language
Structured Question Language
Structured Query Language
Match the following SQL term with a description - FROM
The criteria which must be met
The fields to display
The field and order used to sort the results
The table used in the query
Match the following SQL term with a description - SELECT
The fields to display
The table used in the query
The criteria which must be met
The field and order used to sort the results
Match the following SQL term with a description - WHERE
The table used in the query
The fields to display
The field and order used to sort the results
The criteria which must be set
Match the following SQL term with a description - ORDER BY
The fields to display
The field and order used to sort the results
The table used in the query
The criteria that must be met
In what order does SQL process the instructions?
FROM - SELECT - WHERE - ORDER BY
WHERE - FROM - SELECT - ORDER BY
SELECT - FROM - WHERE - ORDER BY
SELECT - FROM - ORDER By - WHERE
Which of the following is not a database data type?
text
number
array
date
Which example of the field name below is in camel case?
First Name
firstName
FIRSTNAME
firstname
Which symbol would you use to represent more than 50
= 50
< 50
> 50
# 50
The command to remove rows from a table 'CUSTOMER' is:
REMOVE FROM CUSTOMER ...
DROP FROM CUSTOMER ...
DELETE FROM CUSTOMER WHERE ...
UPDATE FROM CUSTOMER ...
How can you change 'Thomas' to 'Michael' in the LastName column in the user table
UPDATE User SET LastName = 'Thomas' INTO LastName = 'Michel'
MODIFY Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
MODIFY Users SET LastName = 'Thomas' INTO LastName = 'Michel'
UPDATE Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
Reorder the following
Order of keywords for SQL SELECT statements?
SELECT
FROM
WHERE
ORDER BY
DDL means
(a)
DML means
(a)
To remove a record from a table which SQL statement would you use?
Remove
Cancel
Delete
Eradicate
In order to modify data in a database we would use which SQL statement?
Update
Amend
Alter
Modify
Which statement is used to extract data from a database?
Extract
Get
Open
Select
Which statement allows us to add a record to a table?
Add To
Update To
Add Into
Insert Into
Less than or equal to?
>=
=>
=<
<=
Which word is missing from the following SQL statement?
Select * table_name
With
Where
From
And
Where does the CREATE Command belong?
DML
DDL
DCL
It is a DML command that is used to display record.
DISPLAY
STRUCTURE
WHERE
SELECT
A primary key can be NULL in the table? TRUE or FALSE
TRUE
FALSE
If you don’t specify ASC or DESC after a SQL ORDER BY clause, the following is used by default
ASC
DESC
There is no default value
None of the mentioned
With SQL, how do you select all the records from a table named “Persons” where the value of the column “FirstName” ends with an “a”?
SELECT * FROM Persons WHERE FirstName=’a’
SELECT * FROM Persons WHERE FirstName LIKE ‘a%’
SELECT * FROM Persons WHERE FirstName LIKE ‘%a’
SELECT * FROM Persons WHERE FirstName=’%a%’
The UPDATE SQL clause can _____________
update only one row at a time
update more than one row at a time
delete more than one row at a time
delete only one row at a time
How can you change “Hansen” into “Nilsen” in the “LastName” column in the Persons table?
UPDATE Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
MODIFY Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
MODIFY Persons SET LastName=’Hansen’ INTO LastName=’Nilsen’
UPDATE Persons SET LastName=’Nilsen’ WHERE LastName=’Hansen’
If you were wanting to filter data, which clause would you use?
Where
Order by
From
Select
To remove a record from a table which SQL statement would you use?
Remove
Cancel
Delete
Eradicate
Which character returns all the data found in a table?
%
#
*
/
Which query command will a user adopt to answer the question, "Which student is below 15 years?"
Cross-tab query
Search Query
Select query
Update query
What will be the following SOL syntax
do:
SELECT fiedlist
FROM tablename
IN anotherdatabase.mdb
WHERE condition
GROUP BY fieldlist
HAVING condition for field that are group
ORDERED BY fieldist
Add records to the table
Update records in the table
Make a table from resulting values
Select data from one or more tables and displaying the results
The SQL statement used to read data from a table is
Get
Query
Read
Select
In order to add a new row to an existing table, the SQL statement to use is
CREATE
INSERT
UPDATE
WHERE
The database language that manages access to a database is called
DCL
DDL
DLL
DML
In order to sort or arrange rows in a table on one or more columns in SQL, the statement to use is
ARRANGE BY
GROUP BY
ORDER BY
SORT BY
A database language that informs database management system about the whole data structure and schema is called?
DCL
DDL
DLL
DML
The correct order of keywords used in an SOL SELECT statement is
FROM, SELECT, WHERE.
SELECT, FROM, WHERE.
SELECT, WHERE, FROM.
WHERE, SELECT, FROM
The object that stores commands to retrieve data from a created database is called a
Form
Query
Report
Table
