Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Display a roll having miminum marks in two subjects?

Answers were Sorted based on User's Feedback



Display a roll having miminum marks in two subjects?..

Answer / sonia

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 ?    5 Yes 2 No

Display a roll having miminum marks in two subjects?..

Answer / pradip jain

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 ?    1 Yes 0 No

Display a roll having miminum marks in two subjects?..

Answer / mahesh

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

Display a roll having miminum marks in two subjects?..

Answer / ivee

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

Display a roll having miminum marks in two subjects?..

Answer / rajesh

Select * from Student_Info where Math=(select min(Math)from
Student_Info) or Eng=(select min(Eng) from Student_Info)

Is This Answer Correct ?    1 Yes 2 No

Display a roll having miminum marks in two subjects?..

Answer / jiten patel

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

Display a roll having miminum marks in two subjects?..

Answer / jiten patel

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 4 No

Post New Answer

More SQL Server Interview Questions

How can i change the column name.

13 Answers   HCL, Yardi Software,


How to change a login name in ms sql server?

0 Answers  


What is merge statement?

0 Answers  


Does sql server 2000 full-text search support clustering?

0 Answers  


how can i lock the column in the table

2 Answers   Accenture,


Explain what are the basic functions for master, msdb, model, tempdb databases?

0 Answers  


Explain the difference between function and stored procedure?

0 Answers  


What is data mart? : sql server analysis services, ssas

0 Answers  


How to create Clustered Primary Key to table?

2 Answers  


hi ..i am working as a sql dba.....now i want to learn more about t-sql..... is it possible to learn online.... plz refer any site ..thankq

0 Answers   IBM,


How do I find the query plan in sql server?

0 Answers  


Explain the difference between cross join and full outer join?

0 Answers  


Categories