how to retrive only second row from table in sql server
2000?

Answer Posted / suresh

Hi,

select top 1 * from (SELECT TOP 2 * from emp) A Order by
empno desc

Is This Answer Correct ?    16 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain what are the different index configurations a table can have?

683


Can you import Microsoft Excel data to SSRS?

89


How are the unique and primary key constraints different?

556


What is transaction server explicit transaction?

536


What is acid properties?

581






Explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?

506


how to create a scrollable cursor with the scroll option? : Sql server database administration

600


what are the different types of replication you can set up in sql server? : Sql server database administration

506


what are the types of indexes? : Sql server database administration

588


What is blocking and how would you troubleshoot it? : sql server database administration

578


What is Extended user-defined?

530


Can group by and orderby be used together?

590


Explain triggers in sql?

547


This question asked during interview, 2) At the end of each month, a new table is created for each bank that contains monthly metrics consolidated at the account level. The table naming convention is bankX_YYYYMM where X represents the numeric designation of the bank and YYYYMM indicates the 4 digit year and 2 digit month. The tables contain the following fields: name data type description account text account number registered boolean indicates whether the account is registered num_trans integer number of transactions made during the time period spend numeric(9,2) total spend during the time period a) Write a SQL query that will display the total number of transactions and total spend for "Bank1" during the 4th quarter of 2009. b) Write a SQL query that will display the total number of transactions and total spend at "Bank1" and "Bank2", broken out by registered vs. non-registered accounts, during January 2010 not sure what is correct answer and how to solve?

2009


Define a cross join?

586