Q1:
2026: 31 May Shift 1
Computer Science
SQL
Easy
Computer Science
What is this query used for?
SELECT * FROM Employee WHERE DeptID NOT IN ('D01', 'D02', 'D06');
2026: 31 May Shift 1
Computer Science
SQL
Easy
Computer Science
What is this query used for?
SELECT * FROM Employee WHERE DeptID NOT IN ('D01', 'D02', 'D06');
2026: 29 May Shift 2
Computer Science
SQL
Easy
Computer Science
What will be the output of following query?
SELECT INSTR("Computer Science", "ter");
2026: 29 May Shift 2
Computer Science
SQL
Easy
Computer Science
Which of the following is the correct statement to add new column in existing table?
2026: 29 May Shift 1
Computer Science
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
2026: 29 May Shift 1
Computer Science
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)
2026: 26 May Shift 1
Computer Science
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 ;
2026: 26 May Shift 1
Computer Science
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?
2026: 24 May Shift 1
Computer Science
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
2026: 24 May Shift 1
Computer Science
SQL
Easy
Computer Science
Sales
| ID | customer_id | order_date | total_amount |
|---|---|---|---|
| 1 | C101 | 2022-01-15 | 1000 |
| 2 | C102 | 2022-02-20 | 500 |
| 3 | C103 | 2022-03-10 | 800 |
| 4 | C101 | 2022-04-05 | 600 |
What is the result of the following query with respect to given relation 'Sales'?
SELECT COUNT(DISTINCT customer_id) FROM Sales;
2026: 23 May Shift 2
Computer Science
SQL
Easy
Computer Science
________________ operations which when applied removes the redundant attribute.
2026: 23 May Shift 1
Computer Science
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
2026: 21 May Shift 1
Computer Science
SQL
Easy
Computer Science
Which of the following is the correct syntax to modify the datatype of a given attribute in an existing table?
2026: 21 May Shift 1
Computer Science
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;
2026: 20 May Shift 1
Computer Science
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
2026: 20 May Shift 1
Computer Science
SQL
Easy
Computer Science
Match the attribute names in List-I with the most suitable data type in List-II
| List-I | List-II |
|---|---|
| Attribute Name | Data type |
| (A) RollNumber | (I) DATE |
| (B) Address | (II) VARCHAR(20) |
| (C) DateofBirth | (III) INT |
| (D) Name | (IV) CHAR(12) |
2026: 19 May Shift 1
Computer Science
SQL
Easy
Computer Science
What will be the output of the following SQL query?
SELECT POWER(4,3);
2026: 19 May Shift 1
Computer Science
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?
2026: 18 May Shift 2
Computer Science
SQL
Easy
Computer Science
Which of the following is a valid syntax for performing NATURAL JOIN on 'TABLE1' and 'TABLE2'?
2026: 18 May Shift 2
Computer Science
SQL
Easy
Computer Science
Match the LIST-I with LIST-II
| LIST-I | LIST-II | ||
|---|---|---|---|
| A. | BETWEEN | I. | Used to eliminate repetition and display values only once |
| B. | IN | II. | Filter rows matching a pattern |
| C. | LIKE | III. | Defines the range of values inclusive of boundary value |
| D. | DISTINCT | IV. | Select values that match any value in the given list of values |
2026: 13 May Shift 2
Computer Science
SQL
Easy
Computer Science
Which language is used to retrieve data from a relation?
2026: 13 May Shift 2
Computer Science
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.
2026: 11 May Shift 2
Computer Science
SQL
Easy
Computer Science
Match the LIST-I with LIST-II
| LIST-I | LIST-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 |
2026: 11 May Shift 2
Computer Science
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)
2025: 3 June Shift 2
Computer Science
SQL
Easy
Computer Science
Choose the correct syntax for deleting one or more records from the table based on a condition.
2025: 30 May Shift 2
Computer Science
SQL
Easy
Computer Science
Match List-I with List-II
| List-I | List-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. |
2025: 30 May Shift 2
Computer Science
SQL
Easy
Computer Science
Which of the following are DDL commands?
(A) ALTER TABLE
(B) DROP TABLE
(C) UPDATE TABLE
(D) CREATE TABLE
2025: 30 May Shift 2
Computer Science
SQL
Easy
Computer Science
Which of the following returns a string type value?
2025: 27 May Shift 2
Computer Science
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) ;
2025: 27 May Shift 2
Computer Science
SQL
Easy
Computer Science
Match List-I with List-II
| List-I | List-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 |
2025: 27 May Shift 2
Computer Science
SQL
Medium
Computer Science
What is the use of "HAVING" clause in SELECT query?