1) What is the full form of SQL?
a. Structured Query List
b. Structure Query Language
c. Sample Query Language
d. None of these.
Show Answer Workspace
2) Which of the following is not a valid SQL type?
a. FLOAT
b. NUMERIC
c. DECIMAL
d. CHARACTER
Show Answer Workspace
3) Which of the following is not a DDL command?
ADVERTISEMENT
a. TRUNCATE
b. ALTER
c. CREATE
d. UPDATE
Show Answer Workspace
4) Which of the following are TCL commands?
a. COMMIT and ROLLBACK
b. UPDATE and TRUNCATE
c. SELECT and INSERT
d. GRANT and REVOKE
Show Answer Workspace
5) Which statement is used to delete all rows in a table without having the action
logged?
a. DELETE
b. REMOVE
c. DROP
d. TRUNCATE
Show Answer Workspace
6) SQL Views are also known as
a. Simple tables
b. Virtual tables
c. Complex tables
d. Actual Tables
Show Answer Workspace
7) How many Primary keys can have in a table?
a. Only 1
b. Only 2
c. Depends on no of Columns
d. Depends on DBA
Show Answer Workspace
8) Which datatype can store unstructured data in a column?
a. CHAR
b. RAW
c. NUMERIC
d. VARCHAR
Show Answer Workspace
9) Which of the following is not Constraint in SQL?
ADVERTISEMENT
a. Primary Key
b. Not Null
c. Check
d. Union
Show Answer Workspace
10) Which of the following is not a valid aggregate function?
a. COUNT
b. COMPUTE
c. SUM
d. MAX
Show Answer Workspace
11) Which data manipulation command is used to combines the records from one or
more tables?
a. SELECT
b. PROJECT
c. JOIN
d. PRODUCT
Show Answer Workspace
12) Which operator is used to compare a value to a specified list of values?
a. ANY
b. BETWEEN
c. ALL
d. IN
Show Answer Workspace
13) What operator tests column for absence of data
a. NOT Operator
b. Exists Operator
c. IS NULL Operator
d. None of the above
Show Answer Workspace
14) In which of the following cases a DML statement is not executed?
a. When existing rows are modified.
b. When a table is deleted.
c. When some rows are deleted.
d. All of the above
Show Answer Workspace
15) If we have not specified ASC or DESC after a SQL ORDER BY clause, the following
is used by default
a. DESC
b. ASC
c. There is no default value
d. None of the mentioned
Show Answer Workspace
16) Which of the following statement is true?
a. TRUNCATE free the table space while DELETE does not.
b. Both TRUNCATE and DELETE statements free the table's space.
c. Both TRUNCATE and DELETE statement does not free the table's space.
d. DELETE free the table space while TRUNCATE does not.
Show Answer Workspace
17) What is returned by INSTR ('JAVAT POINT', 'P')?
a. 6
b. 7
c. POINT
d. JAVAT
Show Answer Workspace
18) A command that lets you change one or more field in a table is:
a. INSERT
b. MODIFY
c. LOOK-UP
d. All of the above
Show Answer Workspace
19) Which of the following is also called an INNER JOIN?
a. SELF JOIN
b. EQUI JOIN
c. NON-EQUI JOIN
d. None of the above
Show Answer Workspace
20) Which of the following is true about the HAVING clause?
a. Similar to the WHERE clause but is used for columns rather than
groups.
b. Similar to WHERE clause but is used for rows rather than columns.
c. Similar to WHERE clause but is used for groups rather than rows.
d. Acts exactly like a WHERE clause.
Show Answer Workspace
21) _______ clause creates temporary relation for the query on which it is defined.
a. WITH
b. FROM
c. WHERE
d. SELECT
Show Answer Workspace
ADVERTISEMENT
ADVERTISEMENT
22) The SQL statement:
1. SELECT ROUND (65.726, -1) FROM DUAL;
Prints:
a. is illegal
b. garbage
c. 726
d. 70
Show Answer Workspace
23) Which of the following is true about the SQL AS clause?
a. The AS clause in SQL is used to change the column name in the output
or assign a name to a derived column.
b. The SQL AS clause can only be used with the JOIN clause.
c. The AS clause in SQL is used to defines a search condition.
d. All of the mentioned
Show Answer Workspace
24) _________ command makes the updates performed by the transaction permanent
in the database?
a. ROLLBACK
b. COMMIT
c. TRUNCATE
d. DELETE
Show Answer Workspace
25) How can you change "Thomas" into "Michel" in the "LastName" column in the
Users table?
a. UPDATE User SET LastName = 'Thomas' INTO LastName = 'Michel'
b. MODIFY Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
c. MODIFY Users SET LastName = 'Thomas' INTO LastName = 'Michel'
d. UPDATE Users SET LastName = 'Michel' WHERE LastName = 'Thomas'
Show Answer Workspace
26) Which command is used to change the definition of a table in SQL?
a. CREATE
b. UPDATE
c. ALTER
d. SELECT
Show Answer Workspace
27) Which type of JOIN is used to returns rows that do not have matching values?
a. Natural JOIN
b. Outer JOIN
c. EQUI JOIN
d. All of the above
Show Answer Workspace
28) A CASE SQL statement is ________?
a. A way to establish a loop in SQL.
b. A way to establish an IF-THEN-ELSE in SQL
c. A way to establish a data definition in SQL
d. All of the above.
Show Answer Workspace
29) Which statement is true regarding routines and triggers?
a. Both run automatically.
b. Both are stored in the database.
c. Both consist of procedural code.
d. Both have to be called to operate.
Show Answer Workspace
30) Which statement is true regarding procedures?
a. They include procedural and SQL statements.
b. They work similarly to the functions.
c. It does not need unique names.
d. It cannot be created with SQL statements.
Show Answer Workspace
31) Which of the following is the basic approaches for joining tables?
a. Union JOIN
b. Natural JOIN
c. Subqueries
d. All of the above
Show Answer Workspace
32) Why we need to create an index if the primary key is already present in a table?
a. Index improves the speed of data retrieval operations on a table.
b. Indexes are special lookup tables that will be used by the database
search engine.
c. Indexes are synonyms of a column in a table.
d. All of the above
Show Answer Workspace
33) Group of operations that form a single logical unit of work is known as
a. View
b. Network
c. Unit
d. Transaction
Show Answer Workspace
34) Shared locks are applied while performing
a. Read operations
b. Write operations
c. A & B both
d. None of the above
Show Answer Workspace
35) Sequence can generate
a. Numeric value
b. Alphanumeric value
c. A & B both
d. None of the above
Show Answer Workspace
36) A sequence in SQL can generate a maximum number:
a. 39 digits
b. 38 digits
c. 40 digits
d. 37 digits
Show Answer Workspace
37) Which of the following is the correct order of a SQL statement?
a. SELECT, GROUP BY, WHERE, HAVING
b. SELECT, WHERE, GROUP BY, HAVING
c. SELECT, HAVING, WHERE, GROUP BY
d. SELECT, WHERE, HAVING, GROUP BY
Show Answer Workspace
38) What is the difference between a PRIMARY KEY and a UNIQUE KEY?
a. Primary key can store null value, whereas a unique key cannot store null
value.
b. We can have only one primary key in a table while we can have
multiple unique keys
c. Primary key cannot be a date variable whereas unique key can be
d. None of these
Show Answer Workspace
39) Which of the following are the synonyms for Column and ROW of a table?
1. Row = [Tuple, Record]
2. Column = [Field, Attribute]
3. Row = [Tuple, Attribute]
4. Columns = [Field, Record]
a. 1 and 2
b. 3 and 4
c. Only 1
d. Only 2
Show Answer Workspace
40) Which operator is used to compare the NULL values in SQL?
a. Equal
b. IN
c. IS
d. None of Above
Show Answer Workspace
41) Which of the following statement is correct regarding the difference between
TRUNCATE, DELETE and DROP command?
I. DELETE operation can be rolled back but TRUNCATE and DROP operations
cannot be rolled back.
II. TRUNCATE and DROP operations can be rolled back but DELETE operations
cannot be rolled back.
III. DELETE is an example of DML, but TRUNCATE and DROP are examples of
DDL.
IV. All are an example of DDL.
a. I and III
b. II and III
c. II and IV
d. II and IV
Show Answer Workspace
42) Which of the following options are correct regarding these three keys (Primary
Key, Super Key, and Candidate Key) in a database?
I. Minimal super key is a candidate key
II. Only one candidate key can be a primary key
III. All super keys can be a candidate key
IV. We cannot find a primary key from the candidate key
a. I and II
b. II and III
c. I and III
d. II and IV
Show Answer Workspace
43) When the wildcard in a WHERE clause is useful?
a. When an exact match is required in a SELECT statement.
b. When an exact match is not possible in a SELECT statement.
c. When an exact match is required in a CREATE statement.
d. When an exact match is not possible in a CREATE statement.
Show Answer Workspace
44) ______ is NOT a type of constraint in SQL language?
a. FOREIGN KEY
b. PRIMARY KEY
c. UNIQUE
d. ALTERNATE KEY
Show Answer Workspace
45) Find the cities name with the condition and temperature from table 'whether'
where condition = sunny or cloudy but temperature >= 60.
a. SELECT city, temperature, condition FROM weather WHERE condition =
'cloudy' AND condition = 'sunny' OR temperature >= 60
b. SELECT city, temperature, condition FROM weather WHERE condition =
'cloudy' OR condition = 'sunny' OR temperature >= 60
c. SELECT city, temperature, condition FROM weather WHERE condition =
'sunny' OR condition = 'cloudy' AND temperature >= 60
d. SELECT city, temperature, condition FROM weather WHERE condition =
'sunny' AND condition = 'cloudy' AND temperature >= 60
Show Answer Workspace
46) Which of the following statement is correct to display all the cities with the
condition, temperature, and humidity whose humidity is in the range of 60 to 75 from
the 'whether' table?
a. SELECT * FROM weather WHERE humidity IN (60 to 75)
b. SELECT * FROM weather WHERE humidity BETWEEN 60 AND 75
c. SELECT * FROM weather WHERE humidity NOT IN (60 AND 75)
d. SELECT * FROM weather WHERE humidity NOT BETWEEN 60 AND 75
Show Answer Workspace
47) ________ is a program that performs some common action on database data and
also stored in the database.
a. Stored Procedure
b. Trigger
c. Stored Function
d. None of the above
Show Answer Workspace
48) Which statement is used to get all data from the student table whose name starts
with p?
a. SELECT * FROM student WHERE name LIKE '%p%';
b. SELECT * FROM student WHERE name LIKE 'p%';
c. SELECT * FROM student WHERE name LIKE '_p%';
d. SELECT * FROM student WHERE name LIKE '%p';
Show Answer Workspace
49) What is the advantage of the clustered index?
a. It is fast to update the records.
b. It does not need extra work for SQL queries.
c. It minimizes the page transfer and maximizes the cache hits.
d. None of the above is correct.
Show Answer Workspace
50) Evaluate the SQL statement:
1. SELECT a.emp_name, a.sal, a.dept_id, b.maxsal FROM employees a,
2. (SELECT dept_id, MAX(sal) maxsal FROM employees GROUP BY dept_id) b
3. WHERE a.dept_id = b.dept_id AND a.sal < b.maxsal;
Which of the following statement is correct?
ADVERTISEMENT
a. The statement gives an error at line 1.
b. The statement gives an error at line 6.
c. The statement produces the employee name, salary, department ID,
and maximum salary earned in the employee department for all
departments that pay less salary than the maximum salary paid in the
company.
d. The statement produces the employee name, salary, department ID,
and maximum salary earned in the employee department for all
employees who earn less than the maximum salary in their department.
Show Answer Workspace
51) Which of the following are the DATETIME data types that can be used in column
definitions?
a. TIMESTAMP
b. INTERVAL MONTH TO DAY
c. INTERVAL YEAR TO MONTH
d. TIMESTAMP WITH DATABASE TIMEZONE
Show Answer Workspace
52) Which data dictionary table can be used to show the object privileges granted to
the user on specific columns?
a. USER_TAB_PRIVS_MADE
b. USER_COL_PRIVS_MADE
c. USER_TAB_PRIVS
d. USER_COL_PRIVS
Show Answer Workspace
53) Evaluate the SQL statement:
1. SELECT ROUND (TRUNCATE (MOD (1600, 10), -1), 2) FROM dual;
What will be displayed?
a. 0
b. 1
c. 00
d. An error statement
Show Answer Workspace
54) What is the need for our query to execute successfully on an existing view?
ADVERTISEMENT
a. The specified table must contain data.
b. We must have a SELECT privilege on the view.
c. We should have a SELECT privilege only on the specified table.
d. The specified table must be in the same database or schema.
Show Answer Workspace
55) Which of the following operator can be used with a multiple-row subquery?
a. =
b. BETWEEN
c. NOT IN
d. <>
Show Answer Workspace
56) _______ is a constraint that can be defined only at the column level?
a. UNIQUE
b. NOT NULL
c. CHECK
d. PRIMARY KEY
Show Answer Workspace