I have a table T in the database. I don't know the columns of the table. But i want to find the first 4 column values. Can you please suggest me the way with simple query ?
[b][red]This message was edited by cas_o at 2004-8-10 14:35:41[/red][/b][hr] : : Hi, : : I have a table T in the database. I don't know the columns of the table. But i want to find the first 4 column values. Can you please suggest me the way with simple query ? : : Thanks, : Kishore : Hi Kishore,
Comments
:
: Hi,
:
: I have a table T in the database. I don't know the columns of the table. But i want to find the first 4 column values. Can you please suggest me the way with simple query ?
:
: Thanks,
: Kishore
:
Hi Kishore,
EXEC sp_columns @table_name = 'T'
will get you a list of columns in table T
I have just realised I could interpret your question several ways. you could aslo do:
select top 4 * from T
This will select the first 4 rows in the table.
;-]
Cas.