Is there a way to write a query in sql that will return the column names for the table?
e.g. if table Foo had columns bar and baz, this query would return 2 rows with “bar” and “baz” in them.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
one way that will work on SQL Server, PostgreSQL and MySQL (might work on others too, will not work on Oracle)