DBMS mcq questions with answers set 11 includes SQL mcqs, SQL basics questions and answers, SQL query mcq questions and Answer, SQL quiz questions, SQL online test, SQL objective questions, SQL mcq online test, structured query language mcqs, SQL query questions and answers for practice, database management system SQL mcq questions and answers.
The following SQL mcqs are very helpful for UGC NET, GATE exam, GRE, lecture computer science, and database-related jobs test or interview. Its also helpful for Microsoft SQL and Oracle certification exams preparation
Databas MCQs Set 11
1. SQL is a _____?A). Procedural language
B). Non-procedural language
C). Not a data sublanguage
D). None of these
View Answer
Correct: B
2. To form a projection with SQL _____?
A). Name the relation to be projected and list the columns to be shown
B). The columns to be obtained arte listed before the keyword SELECT
C). The keywords SELECT and FROM are optional
D). The table to be used is listed before the keyword FROM
View Answer
Correct: A
3. To remove duplicate rows, this _____ qualifier must be specified.
A). UNIQUE
B). ONLY
C). DISTINCT
D). SINGLE
View Answer
Correct: C
4. Which SQL keyword is used to name a new table and describe the table's columns?
A). Set
B). Create
C). Alter
D). Modify
View Answer
Correct: B
5. Which SQL keyword is used to change the structure, properties or constraints of a table?
A). Modify
B). Set
C). Create
D). Alter
View Answer
Correct: D
6. Which one of the following is used to define the structure of the relation, deleting relations and relating schema's?
A). DML(Data Manipulation Langauge)
B). DDL(Data Definition Langauge)
C). Relational Schema
D). Query
View Answer
Correct: B
7. If table PRODUCT has a column PRICE with data type Numeric (8,2), it stores values as _____?
A). 8 digits with no stored decimal point
B). 10 digits with no stored decimal point
C). 6 digits, decimal point and 2 more digits
D). 8 digits, decimal point and 2 more digits
View Answer
Correct: A
8. If the table PRODUCT has a column PRICE that has the data type Numeric (8, 2), the value 12345 will be displayed by the DBMS as _____?
A). 123.45
B). 12345.0
C). 12345
D). 123450.00
View Answer
Correct: A
9. Which SQL keyword is used to delete a table's structure?
A). Alter
B). Drop
C). Delete
D). Update
View Answer
Correct: B
10. When the correct SQL command is used to delete a table's structure, what happens to the data in the table?
A). Nothing because there was no data in the table - only an empty table can be deleted.
B). lf deleted table was a parent table, data is added to the appropriate rows of the child table.
C). The data in the table is also deleted.
D). If deleted table was a child table, data is added to the appropriate rows of the parent table.
View Answer
Correct: C
A). Where, from
B). From, where
C). From, select
D). Select, from
View Answer
Correct: A
12. In an SQL query, which SQL keyword is used to specify the table(s) to be used?
A). Set
B). Update
C). EXISTS
D). From
View Answer
Correct: D
13. The asterisk (*) means that _____?
A). All records meeting the criteria are returned
B). All columns of table are to be obtained
C). All records with partial criteria met are returned
D). None of the above
View Answer
Correct: B
14. Which SQL keyword Is used to state the condition to specifies the rows to be selected?
A). Select
B). Where
C). From
D). EXISTS
View Answer
Correct: B
15. In an SQL query, which SQL keyword is used to join two conditions that both must be true for the rows to be selected?
A). IN
B). OR
C). AND
D). EXISTS
View Answer
Correct: C
16. In SQL the spaces at the end of the string are removed by _____ function.
A). Lower
B). Upper
C). Trim
D). String
View Answer
Correct: C
17. In an SQL query, which SQL keyword is used to determine if a column value is equal to any one of a set of values?
A). EXISTS
B). IN
C). OR
D). AND
View Answer
Correct: B
18. In an SQL query, which built-in function is used to compute the number of rows in a table?
A). Min
B). Max
C). AVG
D). Count
View Answer
Correct: D
19. In an SQL query, which built-in function is used to total numeric columns?
A). SUM
B). AVG
C). Count
D). Min
View Answer
Correct: A
20. In SQL, which built-in function is used to compute the average value of numeric columns?
A). AVG
B). Min
C). MEAN
D). Count
View Answer
Correct: A
A). Variable, equal
B). Fixed, equal
C). Fixed, variable
D). Equal, variable
View Answer
Correct: C
22. In an SQL, which built-in function is used to obtain largest value of numeric columns?
A). Min
B). MAX
C). AVG
D). Count
View Answer
Correct: B
23. In SQL, which built-in function is used to obtain the smallest value of numeric columns?
A). MIN
B). LOWEST
C). Count
D). AVG
View Answer
Correct: A
24. In an SQL query, which SQL keyword is used with built-in functions to group rows that have the same value in a specified column together?
A). SELECT
B). SORT BY
C). ORDER BY
D). GROUP BY
View Answer
Correct: D
25. Which SQL keyword is used with GROUP BY to select groups meeting specified criteria?
A). IN
B). AND
C). HAVING
D). EXISTS
View Answer
Correct: C
26. Which of the following statements contains an error?
A). Select empid from emp;
B). Select * from emp where empid = 10003;
C). Select empid from emp where empid = 10006;
D). Select empid where empid = 1009 and lastname = ‘Hassan’;
View Answer
Correct: D
27. Given a table with the structure: EMPLOYEE (EmpNo, Name, Salary, HireDate), which of the following is not a valid ANSI SQL command?
A). SELECT * FROM EMPLOYEE WHERE Name LIKE 'Ja%';
B). SELECT COUNT(*) FROM EMPLOYEE WHERE Salary < 30000;
C). SELECT COUNT(EmpNo) FROM EMPLOYEE;
D). SELECT HireDate, COUNT(*) FROM EMPLOYEE WHERE Salary < 30000;
View Answer
Correct: D
28. In an SQL query, which SQL keyword is used to implement a subquery?
A). GROUP BY
B). SELECT
C). ORDER BY
D). HAVING
View Answer
Correct: B
29. When one SQL query is embedded in WHERE clause of another SQL query, it is called _____?
A). Subquery
B). Subset
C). Joins
D). WHERE Query
View Answer
Correct: A
30. _____ operator is used for appending two strings.
A). _
B). %
C). ||
D). &
View Answer
Correct: C
Read also>->>Database MCQs With Answers Set 7
Read also>->>Database MCQs With Answers Set 8
Read also>->>Database MCQs With Answers Set 10
Read also>->>Database MCQs With Answers Set 12