0% found this document useful (0 votes)
52 views

Multiple Choice Questions: 18CSC303J

The document contains 18 multiple choice questions about database management systems and SQL. The questions cover topics such as SQL statements, data definition language, data manipulation language, joins, subqueries, PL/SQL, cursors, triggers, and exception handling. Correct answers are provided for each question to test understanding of fundamental database concepts.

Uploaded by

Ch Rd ctd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Multiple Choice Questions: 18CSC303J

The document contains 18 multiple choice questions about database management systems and SQL. The questions cover topics such as SQL statements, data definition language, data manipulation language, joins, subqueries, PL/SQL, cursors, triggers, and exception handling. Correct answers are provided for each question to test understanding of fundamental database concepts.

Uploaded by

Ch Rd ctd
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Database Management Systems(18CSC303J)

UNIT-3
MULTIPLE CHOICE QUESTIONS
1. Select which is not true for SQL
A. It is common language for all database
B. It is non procedural language
C. It is case sensitive
D. The commands are like an english statements

2. The statement to create the employee table with attributes of employee number, emp
name, job is …………
A. CREATE TABLE EMP (EMP_NO Varchar2(10),ENAME Varchar2(10),JOB
Varchar2(9))
B. CREATE TABLE EMP (EMP_NO Number(4),ENAME Varchar2(10),JOB
Varchar2(9))
C. CREATE TABLE EMP (EMP_NO Varchar2(10),ENAME Number(4),JOB
Varchar2(9))
D. CREATE TABLE EMP (EMP_NONumber(4),E_NAME Number(4),JOB
Varchar2(9))

3. The sql command to insert emp name Jack with ID_no 500 with job type clerk is:
A. INSERT INTO EMP VALUES (500,’JACK’,’CLERK’)
B. INSERT EMP VALUES (500,’JACK’,’CLERK’)
C. INSERT INTO EMP (500,’JACK’,’CLERK’)
D. INSERT INTO EMP VALUES (500,JACK,CLERK)

4. The sql statement to retrieve all the record from emp table called “emp” whose salary is
greater than 5000:
A. SELECT * FROM EMP WHERE sal>5000
B. SELECT * FROM EMP sal>5000
C. SELECT FROM EMP WHERE sal>5000
D. SELECT * EMP WHERE sal>5000

5. Which is not true for primary constraints


A. A table or view can have multiple primary key
B. Can have only one primary key
C. The size of the primary key can’t be exceed approximately one database block
D. A composite primary key cannot have more than 32 columns

6. To find average salary of employee from the employee table the command is:
A. SELECT avg(sal) FROM EMP;
B. SELECT avg(sal) EMP;
C. SELECT avg(sal);
D. avg(sal) FROM EMP;
7. Which is not true for union operator:
A. Union operator retrieves the records from both queries without duplication.
B. Union operator retrieves the records from both queries with duplication.
C. Column heading will be selected from the prior query statement.
D. Intersect operators retrieve the common records from both query statements.

8. Example for simple join is:


A. select * emp,dept where emp.deptno= dept.deptno;
B. select * from emp,dept where emp.deptno= dept.deptno;
C. select * from emp,dept where deptno= dept.deptno;
D. select * from emp,dept where emp.deptno= deptno;

9. Select * from emp, dept WHERE emp.deptno = dept.deptno(t); [Indicates]


A. Simple join
B. Left outer join
C. Right outer join
D. Inner join

10. Which is not true for sub queries


A. An ordinary command can be used
B. An ORDER BY command cannot be used in a subquery
C. Subqueries must be enclosed within parentheses.
D. Subqueries that return more than one row can only be used with multiple value
operators such as the IN operator
11. Correlated subquery……….
A. Is a query which is executed one time for each record returned by the outer
query.
B. Is an inner query which is executed one time for each record returned by the
outer query.
C. Is a query which is executed multiple time for each record returned by the outer
query.
D. Is an inner query which is executed multiple times for each record returned by the
outer query.

12. Nested query…………


A. Inner query runs first and only once
B. Other query runs first and only once
C. Inner query runs first and multiple time
D. Outer query runs first and multiple time
13. Which is true for PL/SQL language
A. Block of SQL statements can be executed using PL/SQL
B. It is a non procedural language
C. PL/SQL is completely new language without having any connection with SQL
D. There are three types of blocks in PL/SQL
14. The PL/SQL program for displaying welcome to the database is…………
A. DECLARE
message varchar2(100):= Welcome to SRMIST;
BEGIN
dbms_output.put_line(message);
END;
B. DECLARE
message varchar2(100):= ‘Welcome to SRMIST';
BEGIN
dbms_output.put_line(message);
END;
C. message varchar2(100):= ‘Welcome to SRMIST';
BEGIN
dbms_output.put_line(message);
END;
D. DECLARE
message varchar2(100):= ‘Welcome to SRMIST';
dbms_output.put_line(message);
END;

15. Which is not a step for explicit cursors


A. Declare the cursor for initialize the memory
B. Open the cursor for allocating memory
C. Fetch the cursor values into global variables
D. Close the cursor for release the memory

16. Which is correct under (PL/SQL):


A. Procedure will return
B. Function will return
C. Procedure will not return
D. Function will not return

17. Select correct one for the trigger


A. Triggers are event driven program
B. It is executed manually
C. There are 10 events in PL/SQL
D. There are 6 events

18. Which is not correct for exceptional handling


A. Too many rows is not an exception
B. No data found is an exception
C. Value error is an exception
D. Zero divide is an exception

You might also like