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

How you can add messages to the nt event log from within a stored procedure?

1023


What is a unique index?

900


What is page in sql server?

920


What are the advantages of sql stored procedure?

1035


Explain what is the use of custom fields in report?

884


What is a virtual table in sql?

960


What are the results of running this script?

884


What is pessimistic concurrency?

940


Please illustrate physical database architecture? : SQL Server Architecture

947


What is the maximum size of a dimension? : sql server analysis services, ssas

1012


What is lookup override?

985


Explain what are various ways to enhance the ssrs report?

1014


What is the contrast amongst drop and truncate?

1003


Why people hate cursor?

1118


Do you know the isolation level that sql server support?

939