1. What is the full form of SQL?
- a. Structured Query Language
- b. Structured Query List
- c. Simple Query Language
- d. None of the above
2. Which of the following is not a DDL command?
- a. ALTER
- b. CREATE
- c. UPDATE
- d. TRUNCATE
3. Which of the following is a TCL command?
- a. UPDATE
- b. ROLLBACK
- c. GRANT
- d. ALTER
4. Which of the following are some common RDBMS in use?
- a. MySQL
- b. SQL Server
- c. Oracle
- d. All of the Above
5. What does the following statement in SQL do? DROP TABLE student?
- a. Delete all data from student table
- b. Deletes Student table
- c. Delete all tables from the database
- d. Invalid statement
6. Which datatype can store unstructured data in a column?
- a. CHAR
- b. RAW
- c. NUMERIC
- d. VARCHAR
7. What does BLOB in SQL stand for?
- a. Binary Language for Objects
- b. Big Large Objects
- c. Binary Large Objects
- d. Bigdata Large Objects
8. Which operator compares a value to a specified list of Values?
- a. ANY
- b. *
- c. LIKE
- d. IN
9. Which operator tests the column for the absence of data?
- a. IS ABSENT
- b. =NULL
- c. IS NULL
- d. EXISTS
10. Which is expected when you run the below statement. TRUNCATE TABLE STUDENTS;
- a. Will delete data from Students table but not commit the changes.
- b. Will Delete all data from the Student table successfully.
- c. Will throw exception
- d. delete students table along with data
11. TRUNCATE TABLE STUDENTS; ROLLBACK;
- a. Will delete Student table but not commit the language
- b. Will delete all data from Students table successfully
- c. Will throw exception
- d. Will create students table
12. Which SQL constraint do we use to set some value to a field whose value has not been added explicitly?
- a. UNIQUE
- b. NOT NULL
- c. DEFAULT
- d. CHECK
13. During the transaction before committing which of the following statements is done automatically in case of shutdown?
- a. Rollback
- b. Commit
- c. View
- d. Flashback
14. 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 the TRUNCATE and DELETE statement does not free the table’s space.
- d. DELETE free the table space while TRUNCATE does not.
15. Which of the following statement is true?
- a. Primary key can be null
- b. unique key can’t be null
- c. primary key are unique and not null
- d. primary key can have duplicate values
16. Which of the following commands is used to delete a trigger in SQL?
- a. delete
- b. drop
- c. truncate
- d. alter
17. Select the correct foreign key constraint?
- a. Referential Integrity
- b. Entity Integrity
- c. Domain Integrity
- d. None of the above
18. SELECT ROUND (TRUNCATE (MOD (50, 5), -1), 2) FROM dual;
- a. Error
- b. 0.0
- c. 0
- d. 1
19. How can the name of student “VIRAT” changed to “ROHIT”
- a. UPDATE STUDENT SET NAME = “ROHIT” HAVING NAME = “VIRAT”
- b. UPDATE NAME = “VIRAT” WHERE NAME = “VIRAT”
- c. UPDATE TABLE STUDENT SET NAME = “ROHIT” WHERE NAME = “VIRAT”
- d. UPDATE STUDENT SET NAME = “ROHIT” WHERE NAME = “VIRAT”
20. Which is returned by Select INSTR (“CODING_GLITZ”, ‘T’) from dual?
- a. 3
- b. 4
- c. 9
- d. 10
21. What is returned by Select SUBSTR(‘INDIAN’, 4) from dual;
- 1. I
- 2. IAN
- 3. INDI
- 4. INDIAN
22. What is returned by Select SUBSTR(‘BIPLAB’, 2,3) from dual;
23. Which of the following is not a valid aggregate function?
- 1. COUNT
- 2. SUM
- 3. CONCAT
- 4. MAX
24. What is expected from the below query Select * from employee order by joiningdate;
- 1. select employees and sort data in descending order
- 2. select employees and sort data in ascending order
- 3. select data but not sort as ASC or DESC or not mentioned
- 4. Exception as ASC or DESC is not mentioned
25. Which of the below query is correct to display students age within 18 and 30 years (both Inclusive)
- 1. SELECT * FROM STUDENT WHERE age IN (8 and 30)
- 2. SELECT * FROM STUDENT WHERE age WITHIN (18 AND 30)
- 3. SELECT * FROM STUDENT HAVING age WITHIN (18 AND 30)
- 4. SELECT * FROM STUDENT WHERE age BETWEEN (18 AND 30)
26. Which statement is used to get all data from the student table whose name starts with B?
- 1. SELECT * FROM student WHERE name = ‘B%’;
- 2. SELECT * FROM student WHERE name LIKE ‘B%’;
- 3. SELECT * FROM student WHERE name = ‘B_’;
- 4. SELECT * FROM student WHERE name LIKE ‘%B’;
27. ——–is a constraint that can be defined only at the column level?
- a. UNIQUE
- b. NOT NULL
- c. CHECK
- d. PRIMARY KEY
28. A database administrator can
- a. CREATE USERS
- b. CREATE PRIVILEGES
- c. GRANT PRIVILEGES
- d. All of the Above
29. How many records will be fetched from the below query of the table has total 10 rows select * from students where marks * (Select max(marks) from students);
- a. 0
- b. 1
- c. 2
- d. 10
30. What is the output of the below query select TO_CHAR(TO_DATE(03-03-22), ‘YEAR’) from dual;
- a. 22
- b. 2022
- c. Twenty-Two
- d. Twenty Twenty Two
Answers: 1. a 2. c 3. b 4. d 5. b 6. b 7. c 8. d 9. c 10. b
11. b 12. c 13. a 14. a. 15. c 16. b 17. a 18. c 19. d 20. b
21. b 22. b 23. c 24. b 25. d 26. b 27. b 28. d 29.a 30. c