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                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   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
how to get the rowid/rownumbes of a table in sqlserver
 Question Submitted By :: Y Babu
I also faced this Question!!     Rank Answer Posted By  
 
  Re: how to get the rowid/rownumbes of a table in sqlserver
Answer
# 1
SELECT ROW_NUMBER() OVER(ORDER BY <FieldName>)
FROM <TableName>
 
Is This Answer Correct ?    14 Yes 4 No
Payal Nath
 
  Re: how to get the rowid/rownumbes of a table in sqlserver
Answer
# 2
hi i had tried same but i am getting error

Server: Msg 195, Level 15, State 10, Line 1
'row_number' is not a recognized function name

here querry is 

select row_number() over(order by Income_Verification_id
 ) from Dim_Income_Verification

plz reply !!
 
Is This Answer Correct ?    1 Yes 3 No
Samar
 
 
 
  Re: how to get the rowid/rownumbes of a table in sqlserver
Answer
# 3
SELECT ROW_NUMBER() OVER(ORDER BY eName ASC) AS Rno, * 
FROM   emp

asc or desc required
 
Is This Answer Correct ?    4 Yes 1 No
Vimal
 
  Re: how to get the rowid/rownumbes of a table in sqlserver
Answer
# 4
Row_number() works on SQL 2005 and upper version, if u r 
trying it on 2000 it will not work.
 
Is This Answer Correct ?    3 Yes 1 No
Renu
 
  Re: how to get the rowid/rownumbes of a table in sqlserver
Answer
# 5
Select Count(*) as ro_no from <tablename>
 
Is This Answer Correct ?    0 Yes 1 No
Vivek
 

 
 
 
Other SQL Server Interview Questions
 
  Question Asked @ Answers
 
how can u select the Distinct values in the table, table having 20 columns , i want all columns  1
What is a view? is View updatable? IBM11
How can u convert the Date to String? TCS4
can any one please send sql quries most used in applications.  1
Differences between functions and stored procedures? 247Customer6
What are the steps you will take to improve performance of a poor performing query? HCL1
explain different types of jions with examples briefly? Zensar1
Explain basic SQL queries with SELECT from where Order By, Group By-Having? Wipro2
What are the advantages of using stored procedures? Please don't simply say compilation time will be saved as they are already complied. Please specify some other advantages. 247Customer3
Why we need a group by clause?  3
I need a query that retrieves info from an Oracle table and a query that retrieves info from a SQL Server table. The info has to be joined together according to Record ID numbers. I have very limited access to the Oracle database but full control of the SQL Server database.How do I join two different queries from two different databases?  1
What is a sub-query? When would you use one?  3
What is a table called, if it does not have neither Cluster nor Non-cluster Index?  1
Wht is SQL Injection Attack ?  1
What is indexed views? plz explain with example?  1
what are batch in sql server? Satyam2
Explain Different types of Projects?  1
Which stored procedure will you be running to add a linked server?  1
i have table students with fields classname,studname select * from students classname studname 1 xxxxx 1 yyyy 1 zzzz 2 qqqq 2 tttt 3 dsds 3 www i want the output should be No of students in class 1 : 3 No of students in class 2 : 2 No of students in class 3 : 2 HCL2
what is the Surrogate key?and wt is the diff between Primary key and Surrogate Key?  2
 
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