Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged sql
0
votes
0
answers
331
repeted values in Relation Table
I want to know as we know codd's rule says that no two tuples in a relation should be same. i.e we can not have 2 tuples with same values in clm feilds. now to maintain these constraints, we choose to have some key over the relation ... having mutiset values, (as there are no keys present), how Dbms do indexing to retrive records? someone help me on this pls.
I want to know as we know codd's rule says that no two tuples in a relation should be same. i.e we can not have 2 tuples with same values in clm feilds. now to maintain t...
mohit chawla
1.4k
views
mohit chawla
asked
Jan 25, 2017
Databases
databases
sql
relational-dbms
+
–
1
votes
2
answers
332
Test by Bikram | Mock GATE | Test 2 | Question: 55
Consider the set of relations for the given $SQL$ query: EMP (eno, ename) DEPT (dno,dname) WORKS_IN (eno,dno) Where primary keys of the relations are eno, dno in $EMP$ table and $DEPT$ ... all departments The eno's of employees working in 2 (or) more departments The eno's of employees not working in any department
Consider the set of relations for the given $SQL$ query:EMP (eno, ename) DEPT (dno,dname) WORKS_IN (eno,dno)Where primary keys of the relations are eno, dno in $EMP$ tabl...
Bikram
297
views
Bikram
asked
Jan 24, 2017
Databases
tbb-mockgate-2
databases
sql
+
–
1
votes
1
answer
333
MadeEasy Subject Test: Databases - Sql
Correct Ans and how?
Correct Ans and how?
Jason_Roy
412
views
Jason_Roy
asked
Jan 21, 2017
Databases
made-easy-test-series
databases
sql
+
–
1
votes
1
answer
334
ace 2017 test series
How will this query execute? Q1: Select pno from project Q2: select pno from works where employee.eno=works.eno Now Q1 except Q2 will all projects which do not have an employee working on it. So the outer query should give: All employees who are working on some project. But answer is: Employees working on all projects.
How will this query execute?Q1: Select pno from projectQ2: select pno from works where employee.eno=works.enoNow Q1 except Q2 will all projects which do not have an emplo...
Purple
430
views
Purple
asked
Jan 19, 2017
Databases
test-series
ace-test-series
databases
sql
+
–
2
votes
2
answers
335
SQL Query
The Given Answer is C) , my doubt is can PassportNo take NULL values as it is defined as UNIQUE ?
The Given Answer is C) , my doubt is can PassportNo take NULL values as it is defined as UNIQUE ?
Harsh181996
666
views
Harsh181996
asked
Jan 17, 2017
Databases
databases
sql
+
–
1
votes
2
answers
336
Test by Bikram | Mock GATE | Test 1 | Question: 19
Consider the following $SQ$L query: With max_balance(value) as Select max(balance) from account; The result of executing the above query is: $A$ temporary table is created with the name $max$_$balance$ $A$ temporary view is created with ... view is created with the name $max$_$balance$ $A$ permanent table is created with the name $max$_$balance$
Consider the following $SQ$L query:With max_balance(value) as Select max(balance) from account;The result of executing the above query is:$A$ temporary table is created w...
Bikram
797
views
Bikram
asked
Jan 16, 2017
GATE
tbb-mockgate-1
sql
databases
+
–
0
votes
0
answers
337
MadeEasy Subject Test: Databases - Sql
i think here in Q2 >>> query write in wrong way.........here missing some brackets ??
i think here in Q2 >> query write in wrong way.........here missing some brackets ??
Hradesh patel
232
views
Hradesh patel
asked
Jan 12, 2017
Databases
made-easy-test-series
databases
sql
+
–
6
votes
0
answers
338
SQL query
Plz explain both queries!
Plz explain both queries!
Lokesh .
1.3k
views
Lokesh .
asked
Jan 12, 2017
Databases
databases
sql
+
–
1
votes
0
answers
339
SQL DBMS
shubhamdarokar
824
views
shubhamdarokar
asked
Jan 10, 2017
Databases
sql
databases
+
–
1
votes
2
answers
340
Virtual Gate Test Series: Databases - Sql Query
Consider the following instances $R.$ A 1 2 3 4 B Null 1 2 2 The number of tuples returned by the following $\text{SQL query}$ is$?$ $>$select $*$ from $R$ as $R_{1}$ where not exists$($select $*$ from $R$ where $B = R_{1}.A)$
Consider the following instances $R.$A1234BNull122The number of tuples returned by the following $\text{SQL query}$ is$?$$>$select $*$ from $R$ as $R_{1}$ where not exist...
Purple
508
views
Purple
asked
Jan 9, 2017
Databases
databases
sql
nested-query-with-correlation
virtual-gate-test-series
+
–
1
votes
1
answer
341
MadeEasy Subject Test: Databases - Sql
Please help,not able to decode this query
Please help,not able to decode this query
rahul sharma 5
1.1k
views
rahul sharma 5
asked
Jan 9, 2017
Databases
databases
made-easy-test-series
sql
+
–
0
votes
1
answer
342
Virtual Gate Test Series: Databases - Sql query
Jason GATE
466
views
Jason GATE
asked
Jan 8, 2017
Databases
databases
sql
virtual-gate-test-series
+
–
0
votes
1
answer
343
MadeEasy Subject Test: Databases - Sql
Please explain how??
Please explain how??
Lucky sunda
419
views
Lucky sunda
asked
Jan 7, 2017
Databases
made-easy-test-series
databases
sql
+
–
1
votes
1
answer
344
MadeEasy Subject Test: Databases - Sql
vaishali jhalani
376
views
vaishali jhalani
asked
Jan 7, 2017
Databases
databases
made-easy-test-series
sql
relational-algebra
+
–
3
votes
1
answer
345
[DBMS] Position of Nulls using order by clause
I have a small doubt on order by clause usgae.I need to understand the position of null in case i order by ascending order or desending order,I referred http://docs.oracle.com/javadb/10.8.3.0/ref/rrefsqlj13658.html,whichsays ... order. But i tried some examples at http://www.w3schools.com/sql/sql_update.asp,which gave me opposite result.Please clarify
I have a small doubt on order by clause usgae.I need to understand the position of null in case i order by ascending order or desending order,I referred http://docs.orac...
rahul sharma 5
414
views
rahul sharma 5
asked
Jan 6, 2017
Databases
sql
databases
+
–
2
votes
1
answer
346
SQL-doubt
1. Can WHERE clause be used with aggregate functions ? 2. DISTINCT operates on a single column. DISTINCT for multiple columns is not supported. [T/F]
1. Can WHERE clause be used with aggregate functions ?2. DISTINCT operates on a single column. DISTINCT for multiple columns is not supported. [T/F]
thor
367
views
thor
asked
Jan 2, 2017
Databases
sql
databases
+
–
3
votes
2
answers
347
SQL <=ALL Query
select studentid, studentname from student where birthyear <=ALL( select birthyear from student); Returns detail of the youngest student Returns detail of oldest student Should not the answer be 2) ?
select studentid, studentname from student where birthyear <=ALL( select birthyear from student);Returns detail of the youngest studentReturns detail of oldest studentSho...
yg92
624
views
yg92
asked
Dec 31, 2016
Databases
sql
databases
+
–
3
votes
1
answer
348
Ace Test Series: Databases - Sql
chaser
503
views
chaser
asked
Dec 30, 2016
Databases
ace-test-series
databases
sql
+
–
1
votes
2
answers
349
MadeEasyTest #Query
Turning Turing
413
views
Turning Turing
asked
Dec 27, 2016
Databases
sql
+
–
1
votes
1
answer
350
dbms sql
Which of the following query will give name of the employee who is earning maximum salary? 1. Select name from emp where sal=(Select max(sal) from emp); 2. Select name from emp where sal>=all(Select max(sal) from emp); 3. Both a and b are correct queries 4. Both a and b are incorrect queries
Which of the following query will give name of the employee who is earning maximum salary?1. Select name from emp where sal=(Select max(sal) from emp);2. Select name from...
focus _GATE
313
views
focus _GATE
asked
Dec 26, 2016
Databases
databases
sql
+
–
5
votes
2
answers
351
Working of ANY and ALL with empty set
create table stud(id int, grade varchar(20)); insert into stud values(1, 'A'); insert into stud values(2, 'A'); insert into stud values(3, 'B'); insert into stud values(4, 'B'); // Working of ALL ... rerturns NOTHING and NOT a null. Is that an empty set? How is ANY and ALL deciding their output with respect to empty set?
create table stud(id int, grade varchar(20)); insert into stud values(1, 'A'); insert into stud values(2, 'A'); insert into stud values(3, 'B'); insert into stud values(4...
yg92
2.0k
views
yg92
asked
Dec 21, 2016
Databases
databases
sql
+
–
5
votes
3
answers
352
GATE CSE 1988 | Question: 12iv
Select SNAME from S Where SNOin (select SNO from SP where PNOin (select PNO from P Where COLOUR='BLUE')) What relations are being used in the above SQL query? Given at least two attributes of each of these relations.
Select SNAME from S Where SNOin (select SNO from SP where PNOin (select PNO from P Where COLOUR='BLUE'))What relations are being used in the above SQL query? Given at lea...
go_editor
1.4k
views
go_editor
asked
Dec 20, 2016
Databases
gate1988
normal
descriptive
databases
sql
+
–
10
votes
3
answers
353
GATE CSE 1988 | Question: 12iii
Describe the relational algebraic expression giving the relation returned by the following SQL query. Select SNAME from S Where SNOin (select SNO from SP where PNOin (select PNO from P Where COLOUR='BLUE'))
Describe the relational algebraic expression giving the relation returned by the following SQL query.Select SNAME from S Where SNOin (select SNO from SP where PNOin (sele...
go_editor
2.1k
views
go_editor
asked
Dec 20, 2016
Databases
gate1988
normal
descriptive
databases
sql
+
–
0
votes
0
answers
354
SQL Query || 2
Student (Sid,gender,marks,branch) Query: Retrieve Sid's with highest marks in their respective branch -- using RA logic SELECT Sid FROM Student EXCEPT SELECT Sid FROM Student S1,Student S2 WHERE S1.marks < S2.marks AND S1.branch = S2.branch And -- ... = T.branch AND marks = mrks Please suggest any other method to write this query in SQl , using different logic or construct.
Student (Sid,gender,marks,branch)Query: Retrieve Sid's with highest marks in their respective branch using RA logic SELECT Sid FROM Student EXCEPT SELECT Sid FROM Studen...
dd
5.3k
views
dd
asked
Dec 18, 2016
Databases
sql
databases
+
–
2
votes
2
answers
355
SQL query || 1
Student (Sid,gender,marks,branch) Query: Retrieve Sid's who scored the highest mark? SELECT SID FROM Student EXCEPT SELECT T1.Sid FROM Student T1,Student T2 WHERE T1.marks < T2.marks What are other possible correct variation equal to this query in SQL ?
Student (Sid,gender,marks,branch)Query: Retrieve Sid's who scored the highest mark?SELECT SID FROM Student EXCEPT SELECT T1.Sid FROM Student T1,Student T2 WHERE T1.marks ...
dd
2.3k
views
dd
asked
Dec 17, 2016
Databases
sql
databases
+
–
0
votes
0
answers
356
SQL HAVING Clause
Can Anyone Explain how Query 28 works with example.
Can Anyone Explain how Query 28 works with example.
Beyonder
731
views
Beyonder
asked
Nov 30, 2016
Databases
databases
sql
gatebook-dbms
+
–
23
votes
1
answer
357
GATE CSE 1990 | Question: 10-a
Consider the following relational database: employees (eno, ename, address, basic-salary) projects (pno, pname, nos-of-staffs-allotted) working (pno, eno, pjob) The queries regarding data in the above database are formulated below in SQL. ... FROM projects)) SELECT pname FROM projects WHERE pno IN (SELECT pno FROM projects MINUS SELECT DISTINCT pno FROM working);
Consider the following relational database:employees (eno, ename, address, basic-salary)projects (pno, pname, nos-of-staffs-allotted)working (pno, eno, pjob)The queries r...
makhdoom ghaya
2.9k
views
makhdoom ghaya
asked
Nov 24, 2016
Databases
gate1990
descriptive
databases
sql
+
–
1
votes
2
answers
358
Output of SQL query
The innermost query select those projects which have employees working under it; hence NOT EXISITS will select those Pid's that do not have any employees working under it. The second innermost query will select those Pid's which doesn't have any ... . Hence the outermost query will select 2 also along with other pid's. Doesn't that make option c correct?
The innermost query select those projects which have employees working under it; hence NOT EXISITS will select those Pid's that do not have any employees working under it...
prasitamukherjee
605
views
prasitamukherjee
asked
Nov 22, 2016
Databases
sql
databases
+
–
3
votes
1
answer
359
MadeEasy Test Series: Databases - Sql
i think neither of the queries can implement given specification. plz confirm!
i think neither of the queries can implement given specification. plz confirm!
Anusha Motamarri
653
views
Anusha Motamarri
asked
Nov 21, 2016
Databases
made-easy-test-series
databases
sql
+
–
3
votes
2
answers
360
Predict the output of given SQL query
Tables are : COUNTRY (CODE, NAME) and MEMBER (ORGANIZATION, COUNTRY_code). primary keys are in blod letters and foreign key is in italics. SELECT COUNTRY.name FROM COUNTRY JOIN member ON COUNTRY.code= member.COUNTRY_code WHERE member. ... are members of one or more organisations. 4. List the names of countries which are members of all organisations.
Tables are : COUNTRY (CODE, NAME) and MEMBER (ORGANIZATION, COUNTRY_code). primary keys are in blod letters and foreign key is in italics.SELECT COUNTRY.nameFROM COUNTRYJ...
sh!va
1.9k
views
sh!va
asked
Nov 14, 2016
Databases
databases
sql
+
–
Page:
« prev
1
...
7
8
9
10
11
12
13
14
15
16
17
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register