how to get rank of diffrent student in same table based on
newly inserted row in sql server2008

Answers were Sorted based on User's Feedback



how to get rank of diffrent student in same table based on newly inserted row in sql server2008..

Answer / diveyandu

use dense_rank over(partition by stu_exam_date order by
stu_id) as stu_rank show a particular date student exam or
diff activity rank

Is This Answer Correct ?    4 Yes 2 No

how to get rank of diffrent student in same table based on newly inserted row in sql server2008..

Answer / naveen

place identity on a column at the time of creating table

Ex:
create table test(studentrank identity(1,1))

Is This Answer Correct ?    0 Yes 3 No

how to get rank of diffrent student in same table based on newly inserted row in sql server2008..

Answer / abi

select rank from student;

(because we dont know if the rank field is inserted r not)

Is This Answer Correct ?    0 Yes 4 No

how to get rank of diffrent student in same table based on newly inserted row in sql server2008..

Answer / raju

select * from student where rank = a;

Is This Answer Correct ?    1 Yes 15 No

Post New Answer

More SQL Server Interview Questions

How to perfor If the table running time is taking 2hours and table is having 10 rows in it?

1 Answers  


what is the use of database index(apart from the last searching of records) and what is the use of composite key?

1 Answers  


How to add a new dsn with the odbc driver for sql server?

0 Answers  


Explain the functionalities that views support?

0 Answers  


How to truncate the log in sql server 2012? : sql server database administration

0 Answers  


Explain basic SQL queries with SELECT from where Order By, Group By-Having?

3 Answers   TetraSoft, Wipro,


How check triggers in sql server?

0 Answers  


How to list all user names in a database?

0 Answers  


What do you mean by data integrity?

0 Answers  


what is IDE,DMV in sql server?

1 Answers   Value Labs,


find the 3rd max salary

10 Answers  


How will u get 5 years back record?

5 Answers  


Categories