DBA > Job Interview Questions > Java database interview questions

How do you get Column names only for a table (SQ

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

15. How do you get Column names only for a table (SQL Server)?

Write the Query. -

select name from syscolumns
where id=(select id from sysobjects where name='user_hdr')
order by colid --user_hdr is the table name

Other Job Interview Questions