Q1:

2026: 31 May Shift 1

SQL

Easy

Computer Science

What is this query used for?

SELECT * FROM Employee WHERE DeptID NOT IN ('D01', 'D02', 'D06');

Answer options
Option 2
Correct Answer
Explanation for 2026: 31 May Shift 1 CSE question 1

Q3:

2026: 29 May Shift 2

SQL

Easy

Computer Science

Which of the following is the correct statement to add new column in existing table?

Answer options
Option 1
Correct Answer
Explanation for 2026: 29 May Shift 2 CSE question 3

Q4:

2026: 29 May Shift 1

SQL

Easy

Computer Science

Consider the following Relation 'Sales':

Sales(Attribute-CarID, CustID, SaleDate, PaymentMode, EmpID, SalePrice)

Arrange the following clauses to form a SQL query to display the Customer Id and number of cars purchased if the customer purchased more than 1 car from 'Sales' table.

(A) FROM SALE

(B) HAVING Count(*)>1

(C) SELECT CustID, COUNT(*)

(D) GROUP BY CustID

Answer options
Option 3
Correct Answer
Explanation for 2026: 29 May Shift 1 CSE question 4

Q5:

2026: 29 May Shift 1

SQL

Medium

Computer Science

Consider the following tables in the SchoolUniform database. :

Table 1: UNIFORM (UCode, UName, UColor)

Table 2: COST (UCode, Size, Price)

UCode is Primary Key in table 'UNIFORM' and serves as a Foreign Key in table 'COST'

Identify the correct query to display UCode, UName, UColor, Size, Price from both the tables (Display UCode column only once)

Answer options
Option 1
Correct Answer
Explanation for 2026: 29 May Shift 1 CSE question 5

Q6:

2026: 26 May Shift 1

SQL

Easy

Computer Science

Consider two tables 'A' and 'B' having some common rows. What does the following query return?

SELECT * FROM A

UNION

SELECT * FROM B ;

Answer options
Option 4
Correct Answer
Explanation for 2026: 26 May Shift 1 CSE question 6

Q7:

2026: 26 May Shift 1

SQL

Easy

Computer Science

Consider the table 'Student' with the following attributes:

Roll no, Name, Class, Marks

Which query will display the maximum marks of the Student?

Answer options
Option 1
Correct Answer
Explanation for 2026: 26 May Shift 1 CSE question 7

Q8:

2026: 24 May Shift 1

SQL

Easy

Computer Science

Suppose you want to select distinct salaries working in department 101 from the 'Employee' relation. What will be the correct order of writing the query?

(A) FROM Employee

(B) SELECT

(C) WHERE

(D) DISTINCT Salary

(E) Dept_ID= 101

Answer options
Option 3
Correct Answer
Explanation for 2026: 24 May Shift 1 CSE question 8

Q9:

2026: 24 May Shift 1

SQL

Easy

Computer Science

Sales

IDcustomer_idorder_datetotal_amount
1C1012022-01-151000
2C1022022-02-20500
3C1032022-03-10800
4C1012022-04-05600

What is the result of the following query with respect to given relation 'Sales'?

SELECT COUNT(DISTINCT customer_id) FROM Sales;

Answer options
Option 3
Correct Answer
Explanation for 2026: 24 May Shift 1 CSE question 9

Q10:

2026: 23 May Shift 2

SQL

Easy

Computer Science

________________ operations which when applied removes the redundant attribute.

Answer options

Q11:

2026: 23 May Shift 1

SQL

Medium

Computer Science

What will be the sequence of the given SQL clauses to display the Customer Id (CustID) and number of cars purchased if the customer purchased more than 1 car from SALE table?

A. GROUP BY CustID

B. COUNT(*)

C. HAVING COUNT (*)>1

D. FROM SALE

E. SELECT CustID

Answer options

Q12:

2026: 21 May Shift 1

SQL

Easy

Computer Science

Which of the following is the correct syntax to modify the datatype of a given attribute in an existing table?

Answer options

Q13:

2026: 21 May Shift 1

SQL

Easy

Computer Science

What will be the output of the following SQL statement?

SELECT Ename FROM Employee WHERE Ename like '%a' and salary <= 10000;

Answer options

Q14:

2026: 20 May Shift 1

SQL

Easy

Computer Science

To select distinct salaries of the employees in a department number D001, what should be the sequence of the statement to construct a correct query?

(A) WHERE Deptid = 'D001'

(B) FROM EMPLOYEE

(C) DISTINCT Salary

(D) SELECT

Answer options

Q15:

2026: 20 May Shift 1

SQL

Easy

Computer Science

Match the attribute names in List-I with the most suitable data type in List-II

List-IList-II
Attribute NameData type
(A) RollNumber(I) DATE
(B) Address(II) VARCHAR(20)
(C) DateofBirth(III) INT
(D) Name(IV) CHAR(12)
Answer options

Q17:

2026: 19 May Shift 1

SQL

Easy

Computer Science

Consider the following relation:

STUDENT(RollNumber, SName,SDateofBirth ,GUID)

Which of the SQL Command is correct to update the GUID to 501 for the student having roll no 13?

Answer options

Q18:

2026: 18 May Shift 2

SQL

Easy

Computer Science

Which of the following is a valid syntax for performing NATURAL JOIN on 'TABLE1' and 'TABLE2'?

Answer options

Q19:

2026: 18 May Shift 2

SQL

Easy

Computer Science

Match the LIST-I with LIST-II

LIST-ILIST-II
A.BETWEENI.Used to eliminate repetition and display values only once
B.INII.Filter rows matching a pattern
C.LIKEIII.Defines the range of values inclusive of boundary value
D.DISTINCTIV.Select values that match any value in the given list of values
Answer options

Q21:

2026: 13 May Shift 2

SQL

Easy

Computer Science

__________ results in all pairs of rows from the two input relations, regardless of whether or not they have the same values on common attributes.

Answer options

Q22:

2026: 11 May Shift 2

SQL

Easy

Computer Science

Match the LIST-I with LIST-II

LIST-ILIST-II
A.POW(X,Y)I.Returns the remainder after dividing number X by number Y
B.MOD(X,Y)II.Returns the number X to Y decimal places.
C.ROUND(X,Y)III.Calculates X to the Power Y
D.LENGTH(X)IV.Returns the number of characters in the specified string
Answer options

Q23:

2026: 11 May Shift 2

SQL

Easy

Computer Science

Which of the following functions will perform the same task?

A. MID(string, pos, n)

B. SUB(string, pos, n)

C. SUBSTRING(string, pos, n)

D. SUBSTR(string, pos, n)

Answer options

Q24:

2025: 3 June Shift 2

SQL

Easy

Computer Science

Choose the correct syntax for deleting one or more records from the table based on a condition.

Answer options

Q25:

2025: 30 May Shift 2

SQL

Easy

Computer Science

Match List-I with List-II

List-IList-II
(A) SUBSTR()(I) Returns month name of a date.
(B) MONTHNAME()(II) Returns cardinality of a table.
(C) MOD()(III) Extracts a portion of a string.
(D) COUNT(*)(IV) Returns remainder value.
Answer options

Q26:

2025: 30 May Shift 2

SQL

Easy

Computer Science

Which of the following are DDL commands?

(A) ALTER TABLE

(B) DROP TABLE

(C) UPDATE TABLE

(D) CREATE TABLE

Answer options

Q28:

2025: 27 May Shift 2

SQL

Easy

Computer Science

Write the correct order of UPDATE command onto the 'employee' table to update the Emp_contact, Emp_sal fields having Emp_id 105.

(A) SET Emp_contact=8985852, Emp_sal=11242

(B) UPDATE employee

(C) WHERE

(D) Emp_id =105

(E) ;

Answer options

Q29:

2025: 27 May Shift 2

SQL

Easy

Computer Science

Match List-I with List-II

List-IList-II
(A) SELECT(I) combines the rows together that contains the same values in a specified column
(B) WHERE(II) retrieve data from tables
(C) ORDER BY(III) display data in an ordered form with respect to a specified column
(D) GROUP BY(IV) retrieve data that meet some specified conditions
Answer options

Q30:

2025: 27 May Shift 2

SQL

Medium

Computer Science

What is the use of "HAVING" clause in SELECT query?

Answer options