Font size
WorksheetsLatihan Basic Mysql
Total questions: 21
Worksheet time: 9mins
What does SQL stand for?
Structured Query Language
Structured Question Language
Strong Question Language
None of the above
What does DML stand for?
Data Manipulation Language
Data Modeling Language
Data Markup Language
Data Migration Language
INSERT INTO EMP VALUES(101,'SUMAN','MANAGER');
Which kind of statement is this ?
DDL
DML
Value
Python statement
Which of the following is not a keyword of MYSQL?
Select
Top
Group
Insert
Which of the following query is correct to get Current Date from Query?
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
A. SELECT DATE ( NOW() ) as today;
B. SELECT DATE_FORMAT( NOW( ) , '%Y-%m-%d' ) as today;
Both A and B
None
Which of the following is not a valid aggregate function?
COUNT
MIN
COMPUTE
MAX
SQL is not case sensitive. SELECT is the same as select.
TRUE
FALSE
The _________ statement is used to delete a table.
DROP TABLE
DELETE TABLE
DEL TABLE
REMOVE TABLE
Which one of the following sorts rows in SQL?
SORT BY
ALIGN BY
GROUP BY
ORDER BY
The SQL statement that queries or reads data from a table is __________ .
USE
SELECT
READ
QUERY
With SQL, how do you select all the columns from a table named "Persons"?
SELECT * FROM Persons
SELECT Persons
SELECT [all] FROM Persons
SELECT *.Persons
In a LIKE clause, you can ask for any 6 letter value by writing
LIKE ______ (that's six underscore characters)
LIKE ...... (that's six dots)
LIKE .{6}
LIKE ??????
Which SQL statement is used to update data in a database?
MODIFY
ALTER
SAVE
UPDATE
The SQL keyword BETWEEN is used:
For ranges.
To limit the columns displayed.
As a wildcard.
None of the above
Which clause is used to “Filters out unwanted data”?
FROM
SELECT
ORDER BY
WHERE
Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.
Select first_name from employess where first_name LIKE '%A';
Select first_name from employess where first_name LIKE "'A'%";
Select first_name from employess where first_name LIKE 'A%';
Select first_name from employess where first_name LIKE '%A%';
Write a query to display first_name and last_name of all employees who have their first_name starting with 'A'.
Select first_name from employess where first_name LIKE '%A';
Select first_name from employess where first_name LIKE "'A'%";
Select first_name from employess where first_name LIKE 'A%';
Select first_name from employess where first_name LIKE '%A%';
Which one of the following uniquely identifies the tuples/tows in a relation ?
Secondary key
Primary key
Composite key
Foreign key
What is the full form of DDL ?
Dynamic data language
Detailed data language
Data definition language
Data derivation language
Which of the following keywords will you use to display unique values of the column dept_name ?
SELECT ______ dept_name from COMPANY;
All
distinct
from
name
What will be the output for :-
SELECT LENGTH("EMPLOYEE");
10
8
EMPLOYEE
1
