Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

How to find the column values ?

kishore_peddikishore_peddi Member Posts: 176

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

Comments

  • cas_ocas_o Member Posts: 2
    [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,

    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.


Sign In or Register to comment.