MCQGeeks
0 : 0 : 1
CBSE
JEE
NTSE
NEET
English
UK Quiz
Quiz
Driving Test
Practice
Games
Quiz
SQL
Sql Miscellaneous
Quiz 2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Q.1
'AS' clause is used in SQL for
Selection operation.
Rename operation.
Join operation.
Projection operation.
Q.2
Count function in SQL returns the number of
values.
distinct values.
groups.
columns.
Q.3
What operator tests column for the absence of data?
EXISTS operator
NOT operator
IS NULL operator
None of these
Q.4
In SQL, which command(s) is(are) used to change a table's storage characteristics?
ALTER TABLE
MODIFY TABLE
CHANGE TABLE
All of the above
Q.5
Which of the following is a valid SQL type?
CHARACTER
NUMERIC
FLOAT
All of the above
Q.6
NULL is
the same as 0 for integer
the same as blank for character
the same as 0 for integer and blank for character
not a value
Q.7
Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70
o
F.
SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' OR temperature > 70;
SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' OR temperature > 70;
SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature > 70;
SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature > 70;
Q.8
Find all the tuples having temperature greater than 'Paris'.
SELECT * FROM weather WHERE temperature > (SELECT temperature FROM weather WHERE city = 'Paris')
SELECT * FROM weather WHERE temperature > (SELECT * FROM weather WHERE city = 'Paris')
SELECT * FROM weather WHERE temperature > (SELECT city FROM weather WHERE city = 'Paris')
SELECT * FROM weather WHERE temperature > 'Paris' temperature
Q.9
Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79
SELECT * FROM weather WHERE humidity IN (63 to 79)
SELECT * FROM weather WHERE humidity NOT IN (63 AND 79)
SELECT * FROM weather WHERE humidity BETWEEN 63 AND 79
SELECT * FROM weather WHERE humidity NOT BETWEEN 63 AND 79
Q.10
Find the names of the countries whose condition is sunny.
SELECT country FROM location WHERE condition = 'sunny';
SELECT country FROM location WHERE city IN (SELECT city FROM weather WHERE condition = sunny');
SELECT country FROM location WHERE city NOT IN (SELECT city FROM weather WHERE condition = 'sunny');
SELECT country FROM location WHERE city UNION (SELECT city FROM weather WHERE condition = 'sunny');
Q.11
Find the name of all cities with their temperature, humidity and countries.
SELECT city, temperature, humidity, country FROM location;
SELECT weather.city, temperature, humidity, country FROM weather, location;
SELECT weather.city, temperature, humidity, country FROM weather, location WHERE weather.city = location.city;
SELECT weather.city, temperature, humidity FROM weather SELECT country FROM location WHERE weather.city = location.city;
Q.12
When using the SQL INSERT statement:
rows cannot be copied in mass from one table to another only.
rows can be modified according to criteria only.
rows can either be inserted into a table one at a time or in groups.
rows can be inserted into a table only one at a time only.
Q.13
The SQL ALTER statement can be used to:
change the table data.
change the table structure.
delete rows from the table.
add rows to the table.
Q.14
What SQL command can be used to delete columns from a table?
MODIFY TABLE TableName DROP ColumnName
MODIFY TABLE TableName DROP COLUMN ColumnName
ALTER TABLE TableName DROP ColumnName
ALTER TABLE TableName DROP COLUMN ColumnName
Q.15
What SQL command can be used to add columns to a table?
ALTER TABLE TableName ADD ColumnName
ALTER TABLE TableName ADD COLUMN ColumnName
MODIFY TABLE TableName ADD ColumnName
MODIFY TABLE TableName ADD COLUMN ColumnName
Q.16
The command to remove rows from a table 'CUSTOMER' is:
DROP FROM CUSTOMER ...
UPDATE FROM CUSTOMER ...
REMOVE FROM CUSTOMER ...
DELETE FROM CUSTOMER WHERE ...
Q.17
The SQL WHERE clause:
limits the row data are returned.
limits the column data that are returned.
Both A and B are correct.
Neither A nor B are correct.
Q.18
Which of the following is the original purpose of SQL?
To define the data structures
To specify the syntax and semantics of SQL data definition language
To specify the syntax and semantics of SQL manipulation language
All of the above.
Q.19
The wildcard in a WHERE clause is useful when?
An exact match is necessary in a CREATE statement.
An exact match is necessary in a SELECT statement.
An exact match is not possible in a SELECT statement.
An exact match is not possible in a CREATE statement.
Q.20
The command to eliminate a table from a database is:
DROP TABLE CUSTOMER;
DELETE TABLE CUSTOMER;
REMOVE TABLE CUSTOMER;
UPDATE TABLE CUSTOMER;
0 h : 0 m : 1 s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Report Question
×
What's an issue?
Question is wrong
Answer is wrong
Other Reason
Want to elaborate a bit more? (optional)
Support mcqgeeks.com by disabling your adblocker.
×
Please disable the adBlock and continue.
Thank you.
Reload page