SQL

MCQ questions and answers

  • 4.5/5.0
  • 1k Enrolled
  • All levels
  • Last updated 11/2023
  • English

SQL MCQ (39)

1. ____ company was developed the original version of SQL which is initially called Sequel?
A Microsoft
B IBM
C Bell Lab
D Oracle
Answer: B
2. ____________ provides command for relational schema management.
A DML
B DDL
C DCL
D none
Answer: B
3. ____________ provides the functionality to insert, update and delete tuples.
A DML
B DCL
C DDL
D query
Answer: A
4. ___________ is a collection of data structure with an appropriate access control mechanism.
A table
B Database
C class
D query
Answer: B
5. Which type of SQL language is used to handle the security of the database?
A DDL
B DML
C DCL
D none
Answer: C
6. DCL stands for
A Data Command Language.
B Domain Control Language.
C Data Control Library.
D Data Control Language.
Answer: D
7. The table index is a structure in the database called as ____________.
A component
B object
C class
D file
Answer: B
8. The traditional SQL datatype are called as ____________ datatype.
A vector
B primitive
C scalar
D primary
Answer: C
9. Which datatype is used to store the string?
A varchar
B char
C long
D raw
Answer: A
10. What is the maximum length of the varchar2 datatype?
A 4000 byte
B 1000 byte
C 2000 byte
D 4 byte
Answer: A
11. Only one column of ____________ data type is allowed per table.
A Raw
B Long
C varchar
D Date
Answer: B
12. How many primary key is allowed per table?
A zero
B one
C two
D none
Answer: B
13. Which command is used to delete a table?
A drop table
B delete table
C truncate table
D alter table
Answer: A
14. Which SQL command is used to add attribute to an existing table?
A set
B alter
C truncate
D create
Answer: B
15. Which keyword is used to eliminate the duplicate records in the insert query?
A distinct
B unique
C aggreegate
D order by
Answer: A
16. _____ command used to undo transactions that have not already been saved to the database.
A Recovery
B Rollback
C Savepoint
D none
Answer: B
17. ____________ is allow to undo the only parts of a transaction.
A Savepoint
B Rollback
C Commit
D Recover
Answer: A
18. Which command is used to save a permanent changes in the database?
A Savepoint
B Commit
C Recover
D save
Answer: B
19. ____________ is a logical unit of work which includes the one or more SQL statements.
A query
B workspace
C transaction
D savepoint
Answer: C
20. Which symbol is use to notify the variable value?
A * (Asterik)
B & (Ampersent)
C + (Plus)
D () parenthesis
Answer: B
21. Which function is used to return the number of rows?
A avg()
B count(*)
C sum()
D max()
Answer: B
22. ______ keyword is use to perform SELECT operation on two table.
A Join
B Order by
C Having
D commit
Answer: A
23. ______ join is based on the equality of the column values in the two tables Ex.(student.courseID=teacher.courseID).
A theta-join
B equi-join
C self-join
D outer join
Answer: B
24. Which of the following is not a database?
A SQL Server
B MySQL
C SQL
D SQLite
Answer: C
25. What is used to speed up the access of data?
A Table
B Synonym
C Index
D Sequence
Answer: C
26. Which of following is an open source database?
A Oracle
B SQL Server
C MySQL
D MS Access
Answer: C
27. ____________ is also called as inner join.
A Outer join
B Self join
C Equi join
D Theta join
Answer: C
28. ____________ is a logical table which is based on one or more table in the database.
A Index
B View
C Query
D Synonym
Answer: B
29. ______ is a procedural extension of SQL which is developed by the oracle.
A PL/SQL
B PC/SQL
C MySQL
D SQLPlus
Answer: A
30. _______ command is not a part of PL/SQL block?
A create
B alter
C sqlPlus
D all of the above
Answer: D
31. Columns are also called as ____________.
A tuple
B records
C attributes
D none
Answer: C
32. Rows is also known as ____________.
A tuples
B records
C A and B
D attribute
Answer: C
33. Each attribute draws a value from the pool of values is called ____________.
A tuple
B domain
C field
D records
Answer: B
34. How many primary keys can be set to the table?
A Zero
B Two
C Many
D One
Answer: D
35. GRANT and REVOKE command are specified in ____________ language.
A DDL
B DCL
C DML
D PCL
Answer: B
36. CREATE command is defined in a ____________ language.
A DML
B DCL
C DDL
D PL/SQL
Answer: C
37. Which of the following is a correct syntax that matches any string beginning with the “net”?
A %net
B %net%
C ?net
D –net%
Answer: B
38. Which command is used to match any string at least 3 char?
A “–%”
B “—%”
C “%—%”
D “%3”
Answer: B
39. Which symbol is used to select all the attributes?
A & (Ampersand)
B | (pipe)
C * (asterik)
D + (plus)
Answer: C

Video Lectures of C Language

Icon
Icon
Icon

Subscribe to our Newsletter for Newest Course Updates