Hi,
What is SQL statement for getting all columns of database table ?
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Datta KharadPosted Feb 10, 2012, 1:26 AM
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';
sheetalPosted Feb 10, 2012, 1:02 AM
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
Satyapriya NayakPosted Feb 10, 2012, 12:45 AM
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