Hi,
What is SQL statement for getting all columns of database table ?
Thanks.
SQL statement for getting all columns of table
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Feb 9, 2012, 7:45 PM EST
Select * from tablename
* means all columns from a particular table.
If you need to show all columns with their structure then go for the below query.
SELECT * FROM INFORMATION_SCHEMA.COLUMNS
Thanks
sheetal21 reputationPosted Feb 9, 2012, 8:02 PM EST
You can write the query as follows:
select *
from your_db_tableName
Here, select * means you are selecting all the columns from the given database table mentioned in from clause.
Thanks
Datta KharadRank #2,135 · 668 reputationPosted Feb 9, 2012, 8:26 PM EST
Showing all columns of databse table:-
If you own the table:
select column_name from user_tab_columns
where table_name = 'YOUR TABLE NAME HERE';
If you don't own the table but were granted access to it:
select column_name from all_tab_columns
where owner = 'TABLE OWNER HERE'
and table_name = 'YOUR TABLE NAME HERE';