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
Explain what are the different index configurations a table can have?
Can you import Microsoft Excel data to SSRS?
How are the unique and primary key constraints different?
What is transaction server explicit transaction?
What is acid properties?
Explain the characteristics of a transaction server for example atomicity, consistency, isolation, durability?
how to create a scrollable cursor with the scroll option? : Sql server database administration
what are the different types of replication you can set up in sql server? : Sql server database administration
what are the types of indexes? : Sql server database administration
What is blocking and how would you troubleshoot it? : sql server database administration
What is Extended user-defined?
Can group by and orderby be used together?
Explain triggers in sql?
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?
Define a cross join?