1
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
The relation book (title, price) contains the titles and prices of different books. Assuming that no two books have the same price, what does the following SQL query list?
Select title
From book as B
Where (select count(*)
From book as T
Where T.price > B.price) < 5;
2
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
In an inventory management system implemented at a trading corporation, there are several tables designed to hold all the information. Amongst these, the following two tables hold information on which items are supplied by which suppliers, and which warehouse keeps which items along with the stock-level of these items.
Supply = (supplierid, itemcode)
Inventory = (itemcode, warehouse, stocklevel)
For a specific information required by the management, following SQL query has been written
Select distinct STMP.supplierid
From Supply as STMP
Where not unique (Select ITMP.supplierid
From Inventory, Supply as ITMP
Where STMP.supplierid = ITMP.supplierid
And ITMP.itemcode = Inventory.itemcode
And Inventory.warehouse = 'Nagpur');
For the warehouse at Nagpur, this query will find all suppliers who3
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
Consider two tables in a relational database with columns and rows as follows:
Table: Student
Roll_no | Name | Dept_id |
---|---|---|
1 | ABC | 1 |
2 | DEF | 1 |
3 | GHI | 2 |
4 | JKL | 3 |
Table: Department
Dept_id | Dept_name |
---|---|
1 | A |
2 | B |
3 | C |
Roll_no is the primary key of the Student table, Dept_id is the primary key of the
Department table and Studetn.Dept_id is a foreign key from
Department. Dept_id.
(i) update Student set Dept_id = Null where Roll_no =1
(ii) update Department set Dept_id = Null where Dept_id =1
4
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
A relational database contains two table student and department in which student table has columns roll_no, name and dept_id and department table has columns dept_id and detp_name. the following insert statements were executed successfully to populate the empty tables:
Insert into department values (1, ‘Mathematics’)
Insert into department values (2, ‘Physics’)
Insert into student values (1, ‘Navin’,1)
Insert into student values (2, ‘Mukesh’,2)
Insert into student values (3, ‘Gita’,1)
How many rows and columns will be retrieved by the following SQL statement?
Select * from student, department;
Questions Asked from Structured Query Language (Marks 2)
Number in Brackets after Paper Indicates No. of Questions
GATE CSE 2023 (1)
GATE CSE 2022 (1)
GATE CSE 2021 Set 2 (1)
GATE CSE 2019 (1)
GATE CSE 2016 Set 2 (1)
GATE CSE 2015 Set 1 (1)
GATE CSE 2014 Set 3 (1)
GATE CSE 2014 Set 2 (1)
GATE CSE 2014 Set 1 (1)
GATE CSE 2013 (1)
GATE CSE 2011 (2)
GATE CSE 2009 (2)
GATE CSE 2008 (2)
GATE CSE 2007 (1)
GATE CSE 2006 (4)
GATE CSE 2005 (3)
GATE CSE 2004 (3)
GATE CSE 2003 (1)
GATE CSE 2000 (2)
GATE CSE 1999 (2)
GATE CSE 1998 (1)
GATE CSE Subjects
Theory of Computation
Operating Systems
Algorithms
Database Management System
Data Structures
Computer Networks
Software Engineering
Compiler Design
Web Technologies
General Aptitude
Discrete Mathematics
Programming Languages