Professional Documents
Culture Documents
Q.5) Which is the subset of SQL commands used to manipulate Oracle Database structures, including
tables?
1. Data Definition Language(DDL) 2. Data Manipulation Language(DML) 3. Both of
above 4. None
Q.8) In SQL, which command(s) is(are) used to change a table’s storage characteristics?
1. ALTER TABLE 2. MODIFY TABLE 3. CHANGE TABLE 4. All of the above
Q.9) In SQL, which command is used to SELECT only one copy of each set of duplicable rows
1. SELECT DISTINCT 2. SELECT UNIQUE 3. SELECT DIFFERENT 4. All of the
above
1. 6789 2. 2345 3. 1234 4. 456789
Q.15) Table Employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE. The
SQL statement SELECT COUNT(*) FROM Employee WHERE SALARY > (SELECT SALARY
FROM EMPLOYEE); Prints
1. 10 2. 9 3. 5 4. 0
Q.16) The SQL statement SELECT SUBSTR (‘abcdefghij’, INSTR(‘123321234’, ‘2’), 3,) FROM DUAL;
Prints
1. gh 2. 23 3. bc 4. ab
2/5
7/16/2021
Q.20) Find the names of these cities with temperature and condition whose condition is neither sunny nor
cloudy
1. SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’,
‘cloudy’); 2. SELECT city, temperature, condition FROM weather WHERE condition NOT
BETWEEN (‘sunny’, ‘cloudy’); 3. SELECT city, temperature, condition FROM weather
WHERE condition IN (‘sunny’, ‘cloudy’); 4. SELECT city, temperature, condition FROM
weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);
Q.21) Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79
1. SELECT * FROM weather WHERE humidity IN (63 to 79); 2. SELECT * FROM weather
WHERE humidity NOT IN (63 AND 79); 3. SELECT * FROM weather WHERE humidity
BETWEEN 63 AND 79; 4. SELECT * FROM weather WHERE humidity NOT BETWEEN 63
AND 79;
Q.23) Which of the following SQL commands can be used to add data to a database table?
1. ADD 2. UPDATE 3. APPEND 4. INSERT
Q.26) What SQL command can be used to delete columns from a table?
1. MODIFY TABLE TableName DROP ColumnName; 2. MODIFY TABLE TableName DROP
COLUMN ColumnName; 3. ALTER TABLE TableName DROP ColumnName; 4. ALTER
TABLE TableName DROP COLUMN ColumnName;
Q.29) In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk
3/5
7/16/2021
Q.31) Which of the following do you need to consider when you make a table in SQL?
1. Data types 2. Primary keys 3. Default values 4. All of the above.
Q.32) When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):
1. NOT IN only. 2. LIKE only. 3. IN only. 4. Both IN and NOT IN.
Q.33) Which of the following query is correct for using comparison operators in SQL?
1. SELECT name, course_name FROM student WHERE age>50 and <80; 2. SELECT name,
course_name FROM student WHERE age>50 and age <80; 3. SELECT name, course_name
FROM student WHERE age>50 and WHERE age<80; 4. None of these
Q.34) How to select all data from student table starting the name from letter ‘r’?
1. SELECT * FROM student WHERE name LIKE ‘r%’; 2. SELECT * FROM student WHERE
name LIKE ‘%r%’; 3. SELECT * FROM student WHERE name LIKE ‘%r’; 4. SELECT *
FROM student WHERE name LIKE ‘_r%’;
II - Passage Question (1 * 5 = 5)
Q.35) A School in Delhi uses database management system to store student details. The school maintains a
Student Table : Maintains general details about every student enrolled in school.
StuLibrary Table : To store details of issued books. BookID is the unique identification number issued to
4/5
7/16/2021
1. Identify the SQL Query which displays the data of StuLibrary table inascending order of
Student-ID.
iii) Select * from StuLibrary Order By StuID ASC
iv) Select * from StuLibrary
Order By StuID DESC
a) Both Query i) and iv) will display the desired data.
b) Both Query i) and ii) will display the desired
data.
c) Both Query iii) and iv) will display the desired data.
d) Both Query ii) and iii) will display
the desired data.
2. The Primary Key for StuLibrary Table is/are …….
a) BookID
b) BookID,StuID
c) BookID,Issued_date
d) Issued_date
3. of the following SQL Query will fetch ID of those issued books whichhave not been
returned?
a) SELECT BookID from StuLibrary where BookID is NULL;
b) SELECT BookID from StuLibrary
where StuID is NULL;
c) SELECT BookID from StuLibrary where Issued_date is NULL;
d)
BookID from StuLibrary where Return_date is NULL;
4. The Alternate Key for Student Table will be ……….
a) StuName
b) StuContact
c) StuAadhar
d) StuClass
5. Which of the following SQL Query will display dates on which number ofissued books is
greater
than 5?
a) SELECT Issued_date from StuLibrary GROUP BY Issued_datewhere COUNT(*)>5;
b) SELECT
Issued_date from StuLibrary GROUP BY Return_datehaving count(*)>5
c) SELECT Issued_date
from StuLibrary GROUP BY Issued_datehaving count(*)>5
d) SELECT Issued_date from
StuLibrary GROUP BY Return_datewhere COUNT(*)>5
Q.36) Relation R1 has 10 tuples and 5 attributes. Relation R2 has 0 tuples and 7 attributes. When a CROSS
JOIN is achieved between R1 and R2, how many tuples would the resultant set have?
1. 28 2. 10 3. 0 4. 35
5/5