Q.
What is the full form of ?
Structured Query Language
Structured Query List
Simple Query Language
Show Explanation
Explanation:
No explanation available.
Q.
Find all the tuples having temperature greater than ''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 > (SELECT temperature FROM weather WHERE city = ''Paris'')
Show Explanation
Explanation:
No explanation available.
Q.
What is the meaning of LIKE ''%0%0%
Feature begins with two 0''s
Feature ends with two 0''s
Feature has more than two 0''s
N/A / Missing in source dump
Show Explanation
Explanation:
No explanation available.
Q.
Which SQL keyword is used to retrieve only unique values?
DISTINCTIVE
DISTINCT
UNIQUE
Show Explanation
Explanation:
No explanation available.
Q.
What is an SQL virtual table that is constructed from other tables?
A relation
view
Just another table
Show Explanation
Explanation:
No explanation available.
Q.
The SQL keyword BETWEEN is used:
for ranges.
as a wildcard.
to limit the columns displayed.
Show Explanation
Explanation:
No explanation available.
Q.
The result of a SQL SELECT statement is a ________ .
Show Explanation
Explanation:
No explanation available.
Q.
The SQL WHERE clause:
limits the column data that are returned.
Both A and B are correct.
limits the row data are returned.
Show Explanation
Explanation:
No explanation available.
Q.
The FROM SQL clause is used to...
specify what table we are selecting or deleting data FROM
specify search condition
specify range for search condition
Show Explanation
Explanation:
No explanation available.
Q.
Which of the following do you need to consider when you make a table in SQL?
Data types
Default values
Primary keys
N/A / Missing in source dump
Show Explanation
Explanation:
No explanation available.
Q.
Which of the following join is also called as an ''inner-join''?
Equijoin
Non-Equijoin
Self-Join
Show Explanation
Explanation:
No explanation available.
Q.
Which of the following is illegal?
N/A / Missing in source dump
SELECT SYSDATE - (SYSDATE + 2) FROM DUAL;
SELECT SYSDATE - SYSDATE FROM DUAL;
SELECT SYSDATE - (SYSDATE - 2) FROM DUAL;
Show Explanation
Explanation:
No explanation available.
Q.
The command to remove rows from a table ''CUSTOMER'' is:
N/A / Missing in source dump
DROP FROM CUSTOMER ...
REMOVE FROM CUSTOMER ...
UPDATE FROM CUSTOMER ...
Show Explanation
Explanation:
No explanation available.
Q.
Which SQL statement is used to delete data FROM a database?
COLLAPSE
ALTER
N/A / Missing in source dump
REMOVE
Show Explanation
Explanation:
No explanation available.
Q.
Which of the following is the original purpose of SQL?
To specify the syntax and semantics of SQL data definition language
To define the data structures
To specify the syntax and semantics of SQL manipulation language
Show Explanation
Explanation:
No explanation available.
Q.
NULL is
N/A / Missing in source dump
the same as blank for character
the same as 0 for integer
the same as 0 for integer and blank for character
Show Explanation
Explanation:
No explanation available.
Q.
A command that lets you change one or more fields in a record is
Show Explanation
Explanation:
No explanation available.
Q.
When using the SQL INSERT statement:
rows can be modified according to criteria only.
rows cannot be copied in mass from one table to another only.
rows can either be inserted into a table one at a time or in groups.
Show Explanation
Explanation:
No explanation available.
Q.
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
Show Explanation
Explanation:
No explanation available.
Q.
Which of the following group functions ignore NULL values?
MAX
COUNT
SUM
N/A / Missing in source dump
Show Explanation
Explanation:
No explanation available.
Q.
SQL can be used to:
create database structures only.
N/A / Missing in source dump
modify database data only.
query database data only.
Show Explanation
Explanation:
No explanation available.
Q.
Which command undo all the updates performed by the SQL in the transaction?
Show Explanation
Explanation:
No explanation available.
Q.
Which SQL query returns the maximum salary from the employee table?
SELECT salary FROM employee WHERE salary = MAX(salary);
SELECT TOP salary FROM employee;
SELECT MAX(salary) FROM employee;
Show Explanation
Explanation:
The correct option is: Option B
Q.
Which SQL operator is used to combine the result of two SELECT statements?
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which of the following is true about PRIMARY KEY in SQL?
It allows NULL values
There can be many primary keys in a table
It uniquely identifies each record in a table
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL statement removes all rows from a table but keeps the table structure?
DROP TABLE table_name;
DELETE * FROM table_name;
TRUNCATE TABLE table_name;
Show Explanation
Explanation:
The correct option is: Option B
Q.
What is the purpose of a FOREIGN KEY in SQL?
To link two tables together
To speed up queries
To enforce uniqueness of a column
Show Explanation
Explanation:
The correct option is: Option A
Q.
What does the BETWEEN operator do in SQL?
Checks if a value is greater than another
Checks if a value is within a range
Checks for exact equality
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL clause groups rows sharing a property into summary rows?
Show Explanation
Explanation:
The correct option is: Option A
Q.
Why is the HAVING clause used in SQL?
To order the rows
To filter groups after aggregation
To filter rows before grouping
Show Explanation
Explanation:
The correct option is: Option B
Q.
What is the main purpose of an INDEX in SQL?
To enforce referential integrity
To remove duplicates
To speed up retrieval of rows
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which SQL query selects employees with no commission (commission is NULL)?
SELECT * FROM employee WHERE commission IS NULL;
SELECT * FROM employee WHERE commission = 'NULL';
SELECT * FROM employee WHERE commission = 0;
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which symbol is used in SQL as a wildcard to match zero or more characters?
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which SQL constraint ensures that a column cannot have NULL values?
NOT NULL
UNIQUE
PRIMARY KEY
Show Explanation
Explanation:
The correct option is: Option B
Q.
Which operator is used in SQL to concatenate strings in Oracle?
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL query orders results by department_id ascending and salary descending?
SELECT * FROM employees ORDER BY department_id, salary;
SELECT * FROM employees SORT BY department_id, salary;
SELECT * FROM employees ORDER BY department_id ASC, salary DESC;
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which of the following best describes a VIEW in SQL?
A temporary backup of data
A virtual table based on a query
A permanent copy of a table
Show Explanation
Explanation:
The correct option is: Option B
Q.
In SQL, which keyword is used in a SELECT to return only distinct rows?
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL function returns the current date and time?
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which SQL keyword is used to implement conditional logic in queries?
Show Explanation
Explanation:
The correct option is: Option B
Q.
Which SQL statement deletes rows from a table?
REMOVE FROM table_name;
DELETE FROM table_name WHERE condition;
DROP table_name;
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which SQL statement is used to modify existing rows in a table?
CHANGE table_name SET column=value;
MODIFY table_name SET column=value;
UPDATE table_name SET column=value WHERE condition;
Show Explanation
Explanation:
The correct option is: Option B
Q.
Which SQL keyword is used to give a column a temporary name?
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL operator is used to test whether a value matches any value in a list?
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which SQL comparison is used to check if a value is NULL?
value IS NULL
value == NULL
value = NULL
Show Explanation
Explanation:
The correct option is: Option B
Q.
Is the SQL BETWEEN operator inclusive of boundary values?
Yes, but only the lower value
Yes, it includes both values
No, it excludes both values
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which statement is true regarding DROP and DELETE?
DELETE removes rows, DROP removes the table
DROP removes rows, DELETE removes table
Both commands remove only rows
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL command is used to change an existing table structure?
MODIFY TABLE
ALTER TABLE
CHANGE STRUCTURE
Show Explanation
Explanation:
The correct option is: Option A
Q.
What does COUNT(*) return in SQL?
The count of non-null values only
The count of unique values
The total number of rows including NULLs
Show Explanation
Explanation:
The correct option is: Option B
Q.
Which SQL query updates salary to 50000 and commission to 10 for employee_id = 101?
UPDATE employees SET (salary, commission)=(50000,10) WHERE employee_id=101;
MODIFY employees SET salary=50000 AND commission=10 WHERE employee_id=101;
UPDATE employees SET salary=50000, commission=10 WHERE employee_id=101;
Show Explanation
Explanation:
The correct option is: Option A
Q.
What happens if you execute DELETE FROM table_name without a WHERE clause?
Nothing happens
All rows are deleted
Only first row is deleted
Show Explanation
Explanation:
The correct option is: Option B
Q.
Which SQL keyword is used to give a column a temporary name?
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL operator is used to test whether a value matches any value in a list?
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which SQL comparison is used to check if a value is NULL?
value IS NULL
value == NULL
value = NULL
Show Explanation
Explanation:
The correct option is: Option B
Q.
Is the SQL BETWEEN operator inclusive of boundary values?
Yes, it includes both values
No, it excludes both values
Yes, but only the lower value
Show Explanation
Explanation:
The correct option is: Option A
Q.
Which statement is true regarding DROP and DELETE?
DROP removes rows, DELETE removes table
DELETE removes rows, DROP removes the table
Both commands remove only rows
Show Explanation
Explanation:
The correct option is: Option C
Q.
Which SQL command is used to change an existing table structure?
CHANGE STRUCTURE
ALTER TABLE
MODIFY TABLE
Show Explanation
Explanation:
The correct option is: Option A
Q.
What does COUNT(*) return in SQL?
The total number of rows including NULLs
The count of unique values
The count of non-null values only
Show Explanation
Explanation:
The correct option is: Option B
Q.
Which SQL query updates salary to 50000 and commission to 10 for employee_id = 101?
UPDATE employees SET salary=50000, commission=10 WHERE employee_id=101;
MODIFY employees SET salary=50000 AND commission=10 WHERE employee_id=101;
UPDATE employees SET (salary, commission)=(50000,10) WHERE employee_id=101;
Show Explanation
Explanation:
The correct option is: Option A
Q.
What happens if you execute DELETE FROM table_name without a WHERE clause?
Nothing happens
Only first row is deleted
All rows are deleted
Show Explanation
Explanation:
The correct option is: Option B