Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

wat will be the sql query to extract only last 3 records
from table supose table hving thousands for records

Answer Posted / pawan k. dubey

1-select * from employee where emp_id >(select count(*)-3
from employee)

2-select * from employee where emp_id in
(
select top 3 emp_id from employee order by emp_id DESC

)

Is This Answer Correct ?    2 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

It is important form e to get the information from log files of applications executed by the task scheduler? Does sql studio save these log files? : sql server management studio

1088


List some major differences between triggers and stored procedures?

980


Describe in brief system database.

1073


How to check if a table is being used in sql server?

1008


How do I start sql server agent automatically?

1027


How to start sql server browser service?

1180


Can we add an identity column to decimal datatype?

1042


How to drop an existing schema in ms sql server?

1144


Explain transaction server explicit transaction?

971


Give an example of why you would want to denormalize a database

1028


Explain what are page splits? : SQL Server Architecture

1119


Can two different columns be merged into single column? Show practically?

1121


What language is sql server written in?

1079


Explain about system stored procedure?

1076


Define views.

1068