How to select top 5 coloumn from a table without using
coloumn name

Answers were Sorted based on User's Feedback



How to select top 5 coloumn from a table without using coloumn name..

Answer / aashish arora

SELECT top 5 * from information_schema.columns where
table_name = 'varTableName'

Is This Answer Correct ?    2 Yes 0 No

How to select top 5 coloumn from a table without using coloumn name..

Answer / dj

Select Top(5) COLUMN_NAME
from INFORMATION_SCHEMA.COLUMNS
Where TABLE_NAME = 'Emp';

Is This Answer Correct ?    1 Yes 0 No

How to select top 5 coloumn from a table without using coloumn name..

Answer / sudharshan

set rowcount 5
select * from table_name

Is This Answer Correct ?    0 Yes 0 No

How to select top 5 coloumn from a table without using coloumn name..

Answer / yunus

select top(5) * from tablename

Is This Answer Correct ?    5 Yes 8 No

How to select top 5 coloumn from a table without using coloumn name..

Answer / satish

select top 5 * from tablename

Is This Answer Correct ?    5 Yes 10 No

Post New Answer

More SQL Server Interview Questions

i use few third party softwares. they r all having their own databases . but the data is repeated in all these databases - say a person is in all the three databases, but his name is stoared in diff format in all databases i want to create a centralised database ,and i dont want to re-enter the records . using the exisating records how can i build a centralised database?

1 Answers   Fidelity,


How do we get current date in SQL Server 2000, Oracle, MS Access?

13 Answers  


How to find related tables in sql server?

0 Answers  


What is filter index?

0 Answers  


please tell me the query to get details of the employee having the second largest salary

11 Answers   247Customer,






How to call a function from a stored procedure in SQL Server ?

0 Answers   HCL,


What are entities and relationships?

0 Answers  


What are the types of subscriptions in SQL Server replication?

0 Answers   HCL,


Where is trigger in sql server?

0 Answers  


What is Self Join?

4 Answers  


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

0 Answers  


What is isnull() operator?

0 Answers  


Categories