SQL command

Results 1 to 2 of 2

Thread: SQL command

  1. #1
    Join Date
    Dec 1969

    Default SQL command

    What is the SQL command to get only the column names from a table?

  2. #2
    Join Date
    Dec 1969

    Default SQL????

    SQL is a language used by many, many databases, and each has its own way of dealing with schema accessibility.<BR><BR>Perhaps you mean SQL Server? Or TSQL?<BR><BR> EXEC sp_columns [string-expression]<BR><BR>where the string-expression gives the name of a table. If omitted, all columns in all tables in the DB are returned.<BR><BR>Incidentally, it&#039;s a "system stored procedure", not a "command", which may be why you didn&#039;t find it if you used "SEARCH" at MSDN.<BR><BR>And if you didn&#039;t mean SQL Server, then you&#039;ll have to say what database you *are* using.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts