You are on page 1of 5

7/16/2021

Delhi Public School Vijayawada


Informatics Practices - 17 Jul 2021
Grade - Class XII
Subject : INFOMATIC PRACTICES Total Marks :40
 
I - Single Answer Multiple Choice Question (34 * 1 = 34)

Q.1) Which of the following group functions ignore NULL values?

1. MAX          2. COUNT          3. SUM          4. All of the above

Q.2) Which of the following is not a DDL statement ?


1. CREATE          2. SELECT          3. ALTER          4. DROP

Q.3) Which of the following is an SQL aggregate function ?


1. Max          2. Avg          3. Sum          4. All of the above

Q.4) What is the full form of SQL?


1. Structured Query Language          2. Structured Query List          3. Simple Query
Language          4. None of these

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.6) Which operator performs pattern matching?


1. BETWEEN operator          2. LIKE operator          3. EXISTS operator          4. None of these

Q.7) What operator tests column for the absence of data?


1. EXISTS operator          2. NOT operator          3. IS NULL operator          4. None of these

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

Q.10) Which of the SQL statements is correct?


1/5
7/16/2021

1. SELECT Username AND Password FROM Users          2. SELECT Username, Password FROM


Users          3. SELECT Username, Password WHERE Username = ‘user1’          4. None of these

Q.11) The FROM SQL clause is used to…


1. specify what table we are selecting or deleting data FROM          2. specify range for search
condition          3. specify search condition          4. None of these

Q.12) Which SQL keyword is used to allow only different values?


1. DISTINCTIVE          2. UNIQUE          3. DISTINCT          4. DIFFERENT

Q.13) Which SQL keyword is used to sort the result-set?


1. SORT BY          2. ORDER          3. ORDER BY          4. SORT

Q.14)  The SQL statement

SELECT SUBSTR (‘123456789’, INSTR (‘abcabcabc’, ‘b’), 4) FROM DUAL;

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

Q.17) Find the output SELECT ROUND(45.926, 2);


1. 45          2. 45.92          3. 45.9          4. 49.93

Q.18) Find all the cities whose humidity is 89


1. SELECT city WHERE humidity = 89;          2. SELECT city FROM weather WHERE humidity =
89;          3. SELECT humidity = 89 FROM weather;          4. SELECT city FROM weather;

Q.19) Find the temperature in increasing order of all cities


1. SELECT city FROM weather ORDER BY temperature;          2. SELECT city, temperature FROM
weather;          3. SELECT city, temperature FROM weather ORDER BY
temperature;          4. SELECT city, temperature FROM weather ORDER BY city;

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.22) If a query involves NOT, AND, OR with no parenthesis


1. NOT will be evaluated first; AND will be evaluated second; OR will be evaluated last.          2. NOT
will be evaluated first; OR will be evaluated second; AND will be evaluated last.          3. AND will be
evaluated first; OR will be evaluated second; NOT will be evaluated last.          4. The order of
occurrence determines the order of evaluation.

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.24) Which of the following join is also called as an ‘inner-join’?


1. Non-Equijoin          2. Self-Join          3. Equijoin          4. None of these

Q.25) Which of the following is NOT a type of SQL constraint?


1. PRIMARY KEY          2. ALTERNATE KEY          3. FOREIGN KEY          4. UNIQUE

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.27) The command to eliminate a table from a database is:


1. DROP TABLE CUSTOMER;          2. DELETE TABLE CUSTOMER;          3. REMOVE TABLE
CUSTOMER;          4. UPDATE TABLE CUSTOMER;

Q.28) The result of a SQL SELECT statement is a ________ .


1. file          2. report          3. table          4. form

Q.29) In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk
3/5
7/16/2021

(*) means that:


1. all columns of the table are to be returned.          2. all records meeting the full criteria are to be
returned.          3. all records with even partial criteria met are to be returned.          4. None of the
above is correct.

Q.30) The HAVING clause does which of the following?


1. Acts EXACTLY like a WHERE clause.          2. Acts like a WHERE clause but is used for columns
rather than groups.          3. Acts like a WHERE clause but is used for groups rather than
rows.          4. Acts like a WHERE clause but is used for rows rather than columns.

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

Database ‘school_record’ under which there are two tables.

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

Each book. Minimum issue duration of a book is one Day.

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    

III - Single Answer Multiple Choice Question (1 * 1 = 1.0)

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

You might also like