ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Databases  >>  SQL Server
 
 


 

 
 Oracle interview questions  Oracle Interview Questions
 SQL Server interview questions  SQL Server Interview Questions
 MS Access interview questions  MS Access Interview Questions
 MySQL interview questions  MySQL Interview Questions
 Postgre interview questions  Postgre Interview Questions
 Sybase interview questions  Sybase Interview Questions
 DB Architecture interview questions  DB Architecture Interview Questions
 DB Administration interview questions  DB Administration Interview Questions
 DB Development interview questions  DB Development Interview Questions
 SQL PLSQL interview questions  SQL PLSQL Interview Questions
 Databases AllOther interview questions  Databases AllOther Interview Questions
Question
Display a roll having miminum marks in two subjects?
 Question Submitted By :: Sonia.sardana
I also faced this Question!!     Rank Answer Posted By  
 
  Re: Display a roll having miminum marks in two subjects?
Answer
# 1
Select * from Student_Info where Math=(select min(Math)from 
Student_Info) or Eng=(select min(Eng) from Student_Info)
 
Is This Answer Correct ?    0 Yes 1 No
Rajesh
 
  Re: Display a roll having miminum marks in two subjects?
Answer
# 2
create table student7(Roll int,English int,Hindi int,Maths 
int)
insert into student7 values(1,12,15,9)
insert into student7 values(2,23,3,13)
insert into student7 values(3,15,12,4)

select roll from student7 where 
maths=(select min(maths) from student7) 
AND
English=(select min(english)from student7)

Rajesh, AND Operator is used b/w two conditions . Answer 
given by you is limted to two subjects, if there are three 
or more subjects then
 
Is This Answer Correct ?    2 Yes 1 No
Sonia
 
 
 
  Re: Display a roll having miminum marks in two subjects?
Answer
# 3
Select * from Student_Info where Math=(select min(Math)from 
Student_Info) and Eng=(select min(Eng) from Student_Info)
 
Is This Answer Correct ?    0 Yes 1 No
Jiten Patel
 
  Re: Display a roll having miminum marks in two subjects?
Answer
# 4
Select * from (table name)where (field1)=(select
min(field1)from 
table name) and (field2)=(select min(field2) from table name)
 
Is This Answer Correct ?    0 Yes 2 No
Jiten Patel
 
  Re: Display a roll having miminum marks in two subjects?
Answer
# 5
Select roll from student
where mark1=(select min(mark1) from student) 
and mark2=(select min(mark2) from student)
 
Is This Answer Correct ?    0 Yes 0 No
Mahesh
 
  Re: Display a roll having miminum marks in two subjects?
Answer
# 6
Suppose we are having a table called abc which has field 
name as marks, subject and roll
now roll2 and roll3 has the same minimum marks as 40
so the query will be

select roll from abc where marks=(select min(marks) from 
abc)
 
Is This Answer Correct ?    0 Yes 0 No
Ivee
 
  Re: Display a roll having miminum marks in two subjects?
Answer
# 7
Select * from marks where 
(Math=(select min(Math)from 
marks) and phy=(select min(phy) from marks)) 
OR
(Math=(select min(Math)from 
marks) and chem=(select min(chem) from marks))
OR
(Phy=(select min(phy)from 
marks) and chem=(select min(chem) from marks))


Sonia if it is 3 subject and will be combine with or clause
 
Is This Answer Correct ?    0 Yes 0 No
Pradip Jain
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
SQL stops working in every 15 days displaying message that database log file is full. Log file size is 3.95 GB. It is happening after shrinking the database also. What is solution to overcome this problem. Please help me as it's urgent.  5
Alternative way to DetDate() function?  4
how to dispaly a particular row details from a given table  1
How to find the last update record in SQL Server?  3
PC(code, model, speed, ram, hd, cd, price) Find the hard drive sizes that are equal among two or more PCs. APX2
can you any body tell me suppose database is suspect mode. how can take to normal? Teledata1
what is web server? Satyam3
Hi Can any one tell me the Good institute to learn SQL esp for Data Base Testing or SQL from scratch to the proficiency level in Hyederabad and facult also. Thankyou well in advance  6
How to select nth record from a table? DELL9
how to find number of columns in a table in sql server 2000 and 2005 also Virtusa7
internal language used in sql server 2000?  1
I am having table Title with TITLE id,Author ID, Publiser ID , table AUTHOR with Author ID, Author Name, table PUBLISER with Pub ID, Pub name Here hot to find out the publiser id who have relesed the books of patriticular author?  3
What are defaults? Is there a column to which a default can't be bound?  2
What is the difference between UNION and UNIONALL? CTS2
can primery key be a non clustered index?  8
What is the difference between a Application Server and a Database Oracle2
hi, how to match retrieve the unmatched records from 2 tables in which we dont have any primary key. example : table1 has 1,2,3,4,5 and table2 has 1,2,3,4,5,6,7,8,9,10 and i want the numbers from 6 to 10 to be displayed and should not come as null. i need the numbers. please reply as soon as possible.  2
Hi SQL gurus, i am working for an MNC... My team is having a problem in sql server. when user slects date prompts from jan 1st to april 30, it should display all months data like : jan aa feb bb mar cc but when it comes to april its taking data like : jan aa feb bb mar cc apr dd...and so on means its taking data again from jan to april which we dont want. we want the data only april month as we are getting jan, feb and mar... can any one write the code to relsove the issue please would be greatful if you can send to shiva_sans@yahoo.co.in and also please send your email also ...so that we will be in touch for any kind of queries ... Thanks a lot in Advance !!!  1
How to find the date and time of last updated table? Teledata4
how insert selected column only ? Robert-Half2
 
For more SQL Server Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com