You are on page 1of 4

SQL Fundamental Questions

1. Which statement is a data retrieval statement ?


a.) select
b.) insert
c.) insert into
d.) update
2. Which statement is a DML(Data Manipulation Language) statement?
a.) insert
b.) delete
c.) update
d.) All are above
3. Which statement is a Transaction Control statement ?
a.) Alter
b.) Rename
c.) Truncate
d.) Savepoint
4. Which statements are DCL(Data Controll Language) statement ?
a.) Revoke
b.) Grand
c.) Rollback
d.) A and B
5. Which of the following are DDL(Data Definition Language) statements ?
a.) create
b.) Alter
c.) Drop
d.) All the above
6. Which is not a ddl command?
a.) Rename
b.) Update
c.) Create
d.) Alter
e.) Drop
7. Which Language is used for the control of data like a user can access any data, based on the
privileges given to him?
a.) DQL
b.) DML
c.) DCL
d.) All the above
8. Which command we use to delete rows permanently from a table?
a.) Delete
b.) Drop
c.) Truncate
d.) All of these
9. By using which command, if we'll delete data from a table that we can get rollback ?
a.) Delete
b.) drop
c.) truncate
d.) all the above
10. What are the true statements about NOSQL ?
a.) Its main characteristic is its non-adherence to Relational Database Concepts.
b.) Concept of NoSQL databases came with internet giants such as Google, Facebook, Amazon etc
who deal with huge volumes of data
c.) NOSQL database are non-relational databases
d.) These are don't use SQL to query the data and don't follow strict schemas like relational models
11. Which statement is not a transaction control statement?
a.) Grant
b.) Commit
c.) Rollback
d.) Savepoint
12. The command we do use to delete rows temporarily from a table
a.) Delete
b.) Drop
c.) Truncate
d.) all of above
13. What does SQL stand for?
a.) Structured Queries Language
b.) Structured Query Language
c.) Structured Question Language
d.) Structured Questions Language
14. NoSQL stands for
a.) Never Operate SQL
b.) No Use Of SQL
c.) Not Only Sql
d.) all of above
15. 'Insert ' is a DDL statement .
a.) True
b.) False
16. Which is not a DDL statement ?
a.) create
b.) alter
c.) delete
d.) drop
17. Which statements are true about DDL ?
a.) DDL is similar to a computer programming language for defining data structures, especially
database schemas
b.) Create, drop, alter are ddl commands
c.) It is also used for inserting, deleting and updating data in a database
18. What is the right command for creating database ?
a.) create db user1
b.) create user1 as db;
c.) create user1 as database; d.)
d.) create database user1 ;

19. To make a new database, table, index which of the following we can use
a.) Alter
b.) Create
c.) Add
d.) Update

20. Which is the correct format for create table ?


a.) CREATE EMP.SCOTT TABLE ( EmpNo NUMBER, EName VarChar(25),Job Char(10) ,Hiredate Date,)
b.) CREATE EMP TABLE (EmpNo NUMBER,EName VarChar(25),Job Char(10) ,Hiredate Date)
c.) CREATE TABLE EMP (EmpNo NUMBER,EName VarChar(25),Job Char(10) ,Hiredate Date)
d.) All the above
21. Which statements are true about 'Alter' Statement ?
a.) Its used when we want to change the table name
b.) We add a column using this command
c.) We drop a column using this command
d.) b and c
22. How to add Emp_Address column to emp table ?
a.) ALTER TABLE EMP add ( EMP_Address Char(24));
b.) ALTER TABLE EMP add EMP_Address Char(24);
c.) ALTER EMP add ( EMP_Address Char(24));
d.) All the above
23. How to add multiple column like Address and DOB , DeptNo to emp table?
a.) ALTER TABLE EMP add ( Address Char(24),Dob date, DeptNo number(8));
b.) ALTER TABLE EMP add ( Address Char(24)),add( Dob date),add (DeptNo number(8));
c.) ALTER TABLE EMP add ( Address Char(24),Dob( date),add (DeptNo number(8));
d.) A and B
24. To change the datatype of a column which is the correct statement
a.) ALTER TABLE table_name update column_name column_type;
b.) ALTER TABLE table_name rename column_name column_type;
c.) ALTER TABLE table_name MODIFY column_name column_type;
d.) ALTER TABLE table_name rechange column_name column_type;
25. How to display the duplicate records from EMP table?

26. How delete duplicate records from a table?


27. How to display the First record and Last record from a table?
28. How to display 3rd Max Sal from a Table using analytical function?
29. How to display 4th record from a table?
30. how to display even records from table?
Answers:
1.a
2.d
3.d
4.d
5.d
6.b
7.c
8.c
9.a
10.c
11.a
12.a
13.b
14.c
15.b
16.c
17.b
18.d
19.b
20.c
21.d
22.b
23.a
24.c

You might also like