WorksheetsQuerying using MySQL
Total questions: 20
Worksheet time: 27mins
Which SQL command is used to describe the structure of the table ?
A table ‘Student’ contains 5 rows and 4 columns initially. 2 more rows are added and 1 more column is added . What will be the degree and cardinality of the table student after adding these rows and columns?
7, 5
5,7
5,5
None of the above
1. All aggregate functions ignore the __________________ value.
similar
NULL
column
1. To perform condition based on a list, we need to use ____________ clause
between
select
in
1. The ___________ character with LIKE matches any substring.
_
%
*
Delete is a ___________ command , Drop is a ___________ command
DML, DDL
DDL, DML
DCL,DML
1. Output of-
SELECT INSTR(‘UNICODE’,’CO’);
1
3
4
1. Which statement is appropriate to change the first name "Madhur" to "Mridul" in the "FName" column in the 'Student' table?
UPDATE Student SET FName='Mridul' WHERE FName='Madhur' ;
MODIFY Student SET FName='Madhur' INTO FName='Mridul ;
UPDATE Student SET FName='Madhur' INTO FName='Mridul'
1. Quotes are required around the standard date and time formats.
False
True
1. The default way to store a date in MySQL is with –
YY-MM-DD
YYYY-MM-DD
YYY-MMM-DDD
1. ______________statement can be used to delete all rows of a table.
DROP
REMOVE
DELETE
Logical operator _______________is used to negate a condition
AND
NOT
OR
1. The OR operator displays a record if ANY of the conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true
True
False
Which of the following are single row functions:
SUBSTR( )
SUM( )
TRIM( )
ROUND( )
1. The HAVING clause places conditions on _____________
Columns
Tables
Group
1. What is the output of-
SELECT ROUND(6.5675, 2);
6.57
6.56
6.5
What will be the output of the following code?
SELECT MOD(14,3);
The command that is used to change the size of column in the table.
Write the SQL clause used to sort the records of a table.
1. Can a table have multiple primary keys? Can it have multiple foreign keys?
Yes,No
No,Yes
Yes,Yes
