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...


how to find the particular row in table?(means suppose one
table contain 10 rows , in these 10 rows how to find the
particular row(example in 10 rows i want 5 row how)?

Answers were Sorted based on User's Feedback



how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 row..

Answer / senthilkumar

SELECT TOP 1 Empid
FROM (SELECT DISTINCT TOP 6 Empid FROM Employees ORDER
BY Empid desc) a ORDER BY Empid asc

Is This Answer Correct ?    4 Yes 6 No

how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 row..

Answer / vamsi krishna

select * from <table name> order by <column name> limit 0,5;
or
select * from <table name> limit 0,5;

Is This Answer Correct ?    1 Yes 3 No

how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 row..

Answer / owen

-- I believe the questionner wants the 5th row
-- (only) from the data.
-- I also assume we don't have a useful ID to work with.
-- This is one way of doing it without cursors:

select top 1 <fieldname>
from <TableName>
where <fieldname> not in
(select top 5 <fieldname>
from <TableName>)

-- NB Changing the "5" in the subquery above sets which
-- row number is returned

Is This Answer Correct ?    0 Yes 2 No

how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 row..

Answer / ashim pal

set rowcount 5

select * from table_name

Is This Answer Correct ?    7 Yes 16 No

how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 row..

Answer / ritu saini

SELECT TOP 5 column FROM table
ORDER BY NEWID()

Is This Answer Correct ?    14 Yes 25 No

how to find the particular row in table?(means suppose one table contain 10 rows , in these 10 row..

Answer / sruthi

select top5 * from table
minus
select top4 from table

Is This Answer Correct ?    5 Yes 19 No

Post New Answer

More SQL Server Interview Questions

What is the correct order of the logical query processing phases?

0 Answers  


How to define the name and server for a new dsn?

0 Answers  


What xml support does the sql server extend?

0 Answers  


What are the basic functions for master, msdb, model, tempdb databases?

0 Answers  


How to use subqueries with the in operators in ms sql server?

0 Answers  


What is exporting utility?

0 Answers  


Explain sql delete command?

0 Answers  


What is implicit cursors?

0 Answers  


Explain concepts of analysis services?

0 Answers  


What is db stored procedure?

0 Answers  


1. What are the grouping function in SQL ? 2. If base table of a view deleted means, what will happen while we querying on view ? will give any error ? 3. Difference between DROP, DELETE, TRUNCATE table ? 4. What is constraints and types ? 5. What is max size of nchar & nvarchar ? 6. Define ROLLBACK, COMMIT, SAVE POINT 7. How non-clustered better ? or rank the Clustered, Non-Clustered and Table scan in performance wise 8. Select 10 rows from a table ? 9. Define DML, DDL, DCL, DTL commands ? 10. What is mean by NULL value ? NULL means "" or 0 or undefined ? 11. Default constraints ? 12. Can we have more then primary Key in table ? 13. Type of integrity ? Entity, Referential, Domain ?

10 Answers   Perot Systems,


What area unit the various kinds of info compression introduced in sql server 2008?

0 Answers  


Categories