Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged sql
1
votes
1
answer
451
DBMS SQL query (3)
worst_engineer
660
views
worst_engineer
asked
Oct 3, 2015
Databases
databases
sql
+
–
1
votes
1
answer
452
DBMS question on SQL query (2)
The answer given is (b) But , according to given query , isn't it d) ?
The answer given is (b)But , according to given query , isn't it d) ?
worst_engineer
766
views
worst_engineer
asked
Oct 3, 2015
Databases
databases
sql
+
–
1
votes
2
answers
453
DBMS question on SQL query
Hi , I tried to solve it in this way -- inner query returning zero tuples. So , outer query becomes select * from table1 where not exists null ( i mean no tuple ). basically , it should give me all the tuples , right ? I know , i am wrong , please clarify.
Hi , I tried to solve it in this way inner query returning zero tuples.So , outer query becomes select * from table1 where not exists null ( i mean no tuple ).basically...
worst_engineer
1.2k
views
worst_engineer
asked
Oct 3, 2015
Databases
databases
sql
+
–
2
votes
1
answer
454
What is the result of a condition when a subquery returns zero tuples ?
I was reading an article regarding the use of ALL, SOME, ANY operatorshttps://oracle-base.com/articles/misc/all-any-some-comparison-conditions-in-sql . In the ALL section, it was mentioned that "If a subquery returns ... different for two operators ? It should evaluate to false for both the cases. What am I missing here ?
I was reading an article regarding the use of ALL, SOME, ANY operatorshttps://oracle-base.com/articles/misc/all-any-some-comparison-conditions-in-sql . In the ALL section...
learncp
741
views
learncp
asked
Sep 15, 2015
Databases
databases
sql
+
–
0
votes
2
answers
455
What is the result of the given query?
SELECT Lname, Fname FROM EMPLOYEE WHERE NOT EXISTS ( SELECT * FROM WORKS_ON B WHERE ( B.Pno IN ( SELECT Pnumber FROM PROJECT WHERE Dnum=5 ) AND NOT EXISTS ( SELECT * FROM WORKS_ON C WHERE C.Essn=Ssn AND C.Pno=B.Pno )) ... of various projects running in various department. What details does the above query fetches? Please explain the steps to solve this query.
SELECT Lname, Fname FROM EMPLOYEE WHERE NOT EXISTS ( SELECT * FROM WORKS_ON B WHERE ( B.Pno IN ( SELECT Pnumber FROM PROJECT WHERE Dnum=5 ) AND NOT EXISTS ( SELECT * FROM...
Shefali
846
views
Shefali
asked
Sep 15, 2015
Databases
sql
+
–
0
votes
1
answer
456
give statement in english for SQL
focus _GATE
416
views
focus _GATE
asked
Jul 16, 2015
Databases
databases
sql
+
–
3
votes
2
answers
457
SQL
Consider the Following Collection of relational schema Professor( profname , deptname) Department (deptname, building) Committee(commname, Profname) Which of following query finds all the professors who have not offices in any of those buildings that professor Piper has offices in ... d1, professor p1 Where P1.Profname=’Piper’ and p1.deptname=D1.deptname ) D) None of these
Consider the Following Collection of relational schemaProfessor( profname , deptname)Department (deptname, building)Committee(commname, Profname)Which of following query ...
spriti1991
1.1k
views
spriti1991
asked
May 19, 2015
Databases
sql
+
–
0
votes
1
answer
458
SQL
Consider the following Realtion Borrower(borrower no , name , age) Loan (copy no , borrower no , due date ) Retrieve the borrower name and number of books currently on loan for each of the borrower 1) Select borrower.name, count (*) from loan where loan.borrower ... .name, count (*) from loan, borrowe where loan.borrower name= borrower.borrower name group by loan .borrower.no 4) None of these
Consider the following RealtionBorrower(borrower no , name , age)Loan (copy no , borrower no , due date )Retrieve the borrower name and number of books currently on loan ...
spriti1991
471
views
spriti1991
asked
May 19, 2015
Databases
sql
+
–
1
votes
1
answer
459
SQL query
Consider the relation Emp (SS#, name , age , salary, dno ) Dept(dno, dname, floor , mgrSS#) Retrieve the social security number of those employees who work in both the show and toy department A) Select distinct e.SS# from Emp e , Dept d where e.dno = d.dno and dname= ... .SS# from emp e , dept d where e.dno= d.dno and d.dname='toy' and d.dname='shoe' c) Both a and b
Consider the relation Emp (SS#, name , age , salary, dno )Dept(dno, dname, floor , mgrSS#)Retrieve the social security number of those employees who work in both the show...
spriti1991
1.1k
views
spriti1991
asked
May 19, 2015
Databases
sql
+
–
1
votes
1
answer
460
SQl query
Consider the relation Customers (custid, name , address , city , state , introducer) List all the customers who have introduced at least one other customer 1) Select distinct e.name from Customer e, Customer F where f.introducer =e.ename 2) Select distinct e.name from Customer e, Customer F where f.introducer <>e.name
Consider the relation Customers (custid, name , address , city , state , introducer)List all the customers who have introduced at least one other customer1) Select distin...
spriti1991
953
views
spriti1991
asked
May 19, 2015
Databases
sql
+
–
40
votes
3
answers
461
GATE CSE 2015 Set 3 | Question: 3
Consider the following relation Cinema($\textit{theater, address, capacity}$) Which of the following options will be needed at the end of the SQL query SELECT P1.address FROM Cinema P1 such that it always finds the addresses of theaters with maximum ... (select max(P2.capacity) from Cinema P2) WHERE P1.capacity > Any (select max(P2.capacity) from Cinema P2)
Consider the following relationCinema($\textit{theater, address, capacity}$)Which of the following options will be needed at the end of the SQL querySELECT P1.address FRO...
go_editor
11.6k
views
go_editor
asked
Feb 14, 2015
Databases
gatecse-2015-set3
databases
sql
normal
+
–
49
votes
4
answers
462
GATE CSE 2015 Set 1 | Question: 27
Consider the following relation: ... P WHERE S.Roll_No= P.Roll_No GROUP BY S.STUDENT_Name The numbers of rows that will be returned by the SQL query is_________________.
Consider the following relation:$$\overset{\text{Student}}{\begin{array}{|c|c|}\hline\\\underline{\textbf{Roll_No}}& \textbf{Student_Name}\\\hline1& \text{Raj} \\...
makhdoom ghaya
17.3k
views
makhdoom ghaya
asked
Feb 13, 2015
Databases
gatecse-2015-set1
databases
sql
normal
numerical-answers
+
–
42
votes
2
answers
463
GATE CSE 2015 Set 1 | Question: 7
SELECT operation in SQL is equivalent to The selection operation in relational algebra The selection operation in relational algebra, except that SELECT in SQL retains duplicates The projection operation in relational algebra The projection operation in relational algebra, except that SELECT in SQL retains duplicates
SELECT operation in SQL is equivalent toThe selection operation in relational algebraThe selection operation in relational algebra, except that SELECT in SQL retains dupl...
makhdoom ghaya
11.2k
views
makhdoom ghaya
asked
Feb 12, 2015
Databases
gatecse-2015-set1
databases
sql
relational-algebra
easy
+
–
5
votes
1
answer
464
A relational table employee.
A relational table Employee (ENo, EName, Dept) has $88$ number of tuples. What will be the result of following SQL statement? SELECT COUNT (ENo) FROM Employee WHERE ENo NOT IN (NULL); $88$ $44$ $0$ $87$
A relational table Employee (ENo, EName, Dept) has $88$ number of tuples. What will be the result of following SQL statement?SELECT COUNT (ENo) FROM Employee WHERE ENo NO...
Vikrant Singh
779
views
Vikrant Singh
asked
Dec 28, 2014
Databases
sql
databases
+
–
5
votes
2
answers
465
Which of the following SQL queries find the managers of the Branches with total asset over 10000?
Consider the following relations: Customer (cid, name, city) Branch (bid, manager, city) Account (accid, bid, cid, balance) bid is foreign key of Account referencing Branch, cid is the foreign key of Account referencing ... .bid HAVING SUM (a.balance) > 10000 c. Both (a) and (b) d. None of these
Consider the following relations:Customer (cid, name, city)Branch (bid, manager, city)Account (accid, bid, cid, balance)bid is foreign key of Account referencing Branch, ...
Tariq Husain Khan
903
views
Tariq Husain Khan
asked
Dec 27, 2014
Databases
databases
sql
+
–
56
votes
7
answers
466
GATE IT 2005 | Question: 69
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 ... who do not supply any item supply exactly one item supply one or more items supply two or more items
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 ta...
Ishrat Jahan
14.3k
views
Ishrat Jahan
asked
Nov 3, 2014
Databases
gateit-2005
databases
sql
normal
+
–
54
votes
4
answers
467
GATE IT 2005 | Question: 68
A table 'student' with schema (roll, name, hostel, marks), and another table 'hobby' with schema (roll, hobbyname) contains records as shown below: ... between the number of rows output by the SQL statement and the number of tuples in $S'$ is $6$ $4$ $2$ $0$
A table 'student' with schema (roll, name, hostel, marks), and another table 'hobby' with schema (roll, hobbyname) contains records as shown below:$$\overset{\text{Table:...
Ishrat Jahan
10.7k
views
Ishrat Jahan
asked
Nov 3, 2014
Databases
gateit-2005
databases
sql
relational-algebra
normal
+
–
38
votes
3
answers
468
GATE IT 2004 | Question: 78
Consider two tables in a relational database with columns and rows as follows: ... 1 Both i and ii will fail i will fail but ii will succeed i will succeed but ii will fail Both i and ii will succeed
Consider two tables in a relational database with columns and rows as follows:$$\overset{\text{Table: Student}}{\begin{array}{|c|c|c|} \hline \textbf {Roll_no} & \textbf{...
Ishrat Jahan
11.0k
views
Ishrat Jahan
asked
Nov 2, 2014
Databases
gateit-2004
databases
sql
normal
+
–
43
votes
5
answers
469
GATE IT 2004 | Question: 76
A table T1 in a relational database has the following rows and columns: ... set marks = marks + 5 Select avg(marks) from T1 What is the output of the select statement? $18.75$ $20$ $25$ $\text{Null}$
A table T1 in a relational database has the following rows and columns: $$\begin{array}{|c|c|c|} \hline \text {Roll no. } & \text {Marks} \\\hline 1& 10 \\\hline 2 & 20 ...
Ishrat Jahan
10.7k
views
Ishrat Jahan
asked
Nov 2, 2014
Databases
gateit-2004
databases
sql
normal
+
–
41
votes
5
answers
470
GATE IT 2004 | Question: 74
A relational database contains two tables student and department in which student table has columns roll_no, name and dept_id and department table has columns dept_id and dept_name. The following insert statements were executed successfully to populate the empty tables: ... department 0 row and 4 columns 3 rows and 4 columns 3 rows and 5 columns 6 rows and 5 columns
A relational database contains two tables student and department in which student table has columns roll_no, name and dept_id and department table has columns dept_id and...
Ishrat Jahan
12.4k
views
Ishrat Jahan
asked
Nov 2, 2014
Databases
gateit-2004
databases
sql
normal
+
–
74
votes
10
answers
471
GATE IT 2006 | Question: 85
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing is available in the database. ... key, then $n$ lies in the range: $36 - 40$ $44 - 48$ $60 - 64$ $100 - 104$
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored ...
Ishrat Jahan
22.4k
views
Ishrat Jahan
asked
Nov 1, 2014
Databases
gateit-2006
databases
sql
normal
+
–
22
votes
4
answers
472
GATE IT 2006 | Question: 84
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored in ascending order of these primary keys as given in the tables. No indexing ... = C.cid and C.colour = 'green' ) Karthikeyan, Boris Sachin, Salman Karthikeyan, Boris, Sachin Schumacher, Senna
Consider a database with three relation instances shown below. The primary keys for the Drivers and Cars relation are did and cid respectively and the records are stored ...
Ishrat Jahan
4.2k
views
Ishrat Jahan
asked
Nov 1, 2014
Databases
gateit-2006
databases
sql
normal
+
–
52
votes
5
answers
473
GATE IT 2008 | Question: 74
Consider the following relational schema: $\text{Student} (\underline{\text{school-id}, \text{sch-roll-no}}, \text{sname}, \text{saddress})$ ... the name of the school and the number of its students scoring $100$ in at least one exam nothing; the query has a syntax error
Consider the following relational schema:$\text{Student} (\underline{\text{school-id}, \text{sch-roll-no}}, \text{sname}, \text{saddress})$$\text{School} (\underline{\tex...
Ishrat Jahan
18.3k
views
Ishrat Jahan
asked
Oct 29, 2014
Databases
gateit-2008
databases
sql
normal
+
–
18
votes
3
answers
474
GATE CSE 1994 | Question: 13
Consider the following relational schema: COURSES (cno, cname) STUDENTS (rollno, sname, age, year) REGISTERED_FOR (cno, rollno) The underlined attributes indicate the primary keys for the relations. The year' attribute for the STUDENTS relation indicates the year in ... for cno $322.$ Write a SQL query to print the age and year of the youngest student in each year.
Consider the following relational schema:COURSES (cno, cname)STUDENTS (rollno, sname, age, year)REGISTERED_FOR (cno, rollno)The underlined attributes indicate the primary...
Kathleen
6.4k
views
Kathleen
asked
Oct 5, 2014
Databases
gate1994
databases
relational-algebra
sql
normal
descriptive
+
–
20
votes
5
answers
475
GATE CSE 1993 | Question: 23
The following relations are used to store data about students, courses, enrollment of students in courses and teachers of courses. Attributes for primary key in each relation are marked by *'. Students (rollno*, sname, saddr) courses (cno*, ... name of students who got A grade in at least one course taught by teacher names Ramesh for the above relational database.
The following relations are used to store data about students, courses, enrollment of students in courses and teachers of courses. Attributes for primary key in each rela...
Kathleen
3.9k
views
Kathleen
asked
Sep 29, 2014
Databases
gate1993
databases
sql
relational-calculus
normal
descriptive
+
–
29
votes
2
answers
476
GATE CSE 2010 | Question: 19
A relational schema for a train reservation database is given below. passenger(pid, pname, age) reservation(pid, class, tid) ... (SELECT * FROM Passenger WHERE age>65 AND Passenger.pid=Reservation.pid) $1, 0$ $1, 2$ $1, 3$ $1, 5$
A relational schema for a train reservation database is given below.passenger(pid, pname, age)reservation(pid, class, tid)$$\overset{\text{Passenger}}{\begin{array}{|c|c|...
go_editor
8.4k
views
go_editor
asked
Sep 29, 2014
Databases
gatecse-2010
databases
sql
normal
+
–
37
votes
1
answer
477
GATE CSE 2011 | Question: 46
Database table by name $\text{Loan_Records}$ ... Bank_Manager FROM Loan_Records) AS S NATURAL JOIN (SELECT Bank_Manager, Loan_Amount FROM Loan_Records) AS T ); $3$ $9$ $5$ $6$
Database table by name $\text{Loan_Records}$ is given below.$$\begin{array}{|c|c|c|} \hline \textbf {Borrower} & \textbf {Bank_Manager} &\textbf {Loan_Amount} \\\hline \...
go_editor
12.8k
views
go_editor
asked
Sep 29, 2014
Databases
gatecse-2011
databases
sql
normal
+
–
37
votes
4
answers
478
GATE CSE 2011 | Question: 32
Consider a database table T containing two columns $\text{X}$ and $\text{Y}$ each of type $\text{integer}$. After the creation of the table, one record $\text{(X=1, Y=1)}$ is inserted in the table. Let $\text{MX}$ and $\text{MY}$ denote the ... of the following SQL query after the steps mentioned above are carried out? SELECT Y FROM T WHERE X=7; $127$ $255$ $129$ $257$
Consider a database table T containing two columns $\text{X}$ and $\text{Y}$ each of type $\text{integer}$. After the creation of the table, one record $\text{(X=1, Y=1)}...
go_editor
12.6k
views
go_editor
asked
Sep 29, 2014
Databases
gatecse-2011
databases
sql
normal
+
–
43
votes
7
answers
479
GATE CSE 2014 Set 3 | Question: 54
Consider the following relational schema: employee (empId,empName,empDept) customer (custId,custName,salesRepId,rating) salesRepId is a foreign key referring to empId of the employee relation. Assume that each employee makes a sale to at least one ... a 'GOOD' rating. Names of all the employees with all their customers having a 'GOOD' rating.
Consider the following relational schema:employee (empId,empName,empDept) customer (custId,custName,salesRepId,rating) salesRepId is a foreign key referring to empId of t...
go_editor
16.5k
views
go_editor
asked
Sep 28, 2014
Databases
gatecse-2014-set3
databases
sql
easy
+
–
81
votes
6
answers
480
GATE CSE 2014 Set 2 | Question: 54
SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following queries always gives the same answer as the nested query shown below: select * from R where a in (select S.a from S) select R. ... a from S) as S1 where R.a=S1.a select R.* from R,S where R.a=S.a and is unique R
SQL allows duplicate tuples in relations, and correspondingly defines the multiplicity of tuples in the result of joins. Which one of the following queries always gives t...
go_editor
19.5k
views
go_editor
asked
Sep 28, 2014
Databases
gatecse-2014-set2
databases
sql
normal
+
–
Page:
« prev
1
...
11
12
13
14
15
16
17
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register