SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Microsoft Interview Questions
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

testingcareer.kpc
Starting Member

2 Posts

Posted - 02/14/2011 :  06:15:39  Show Profile  Reply with Quote
Hi ,

Can anyone help me in answering the below questions on SQL :

SQL Queries :
1)I have two tables :
COuntry,city
I want all the cities in each country.Question on Cross Join.


2) I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.

3) There are three tables :
E : EID,ENAME
D : DID,DNAME
empdept : eid, did


select the employees who doesn't belong to any dep

4)Discussion on Except ,using cast like type cast. Question in the context of difference between two tables

5) There is a big table with "n" of rows and 40 + columns .It doesn't have primary key.How do you select the primary key.
In other words how do you get the duplicate records.

Regards,
Prasad

madhivanan
Premature Yak Congratulator

India
22461 Posts

Posted - 02/14/2011 :  06:22:37  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
What have you tried so far?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Sachin.Nand
Flowing Fount of Yak Knowledge

2937 Posts

Posted - 02/14/2011 :  07:55:45  Show Profile  Reply with Quote
Were those questions asked at Microsoft ?

PBUH

Go to Top of Page

testingcareer.kpc
Starting Member

2 Posts

Posted - 02/16/2011 :  07:19:21  Show Profile  Reply with Quote
quote:
Originally posted by madhivanan

What have you tried so far?

Madhivanan

Failing to plan is Planning to fail



I tried this :
I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.

select depid,max(sal) from <table name> group by depid;
Go to Top of Page

tra072011
Starting Member

Barbados
1 Posts

Posted - 08/18/2012 :  00:03:01  Show Profile  Reply with Quote
Hi

You can find this info by using search box in the top of website with some keywords related before posting questions.

If you want to get more materials that related to this topic, you can visit: Microsoft interview questions

Best regards.

http://interviewquestionstoask.info/microsoft-interview-questions/

Edited by - tra072011 on 08/27/2012 02:45:36
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.11 seconds. Powered By: Snitz Forums 2000