How to view all columns in an Existing Table

          

Explain how to view all columns in an Existing Table.

<<Previous  Next>>

Oracle - Explain how to view all columns in an Existing Table - April 10, 2009 at 11:00 AM by Amit Satpute

Explain how to view all columns in an Existing Table.  

Use the command DESC and the table name to view the information about the columns.

Eg:

SQL> desc emp;

Name                      Null?                           Type
------------                 ------------                     ----------
EMPNO                  NOT NULL                 NUMBER(4)
ENAME                                                        VARCHAR2(10)                                
JOB                                                              VARCHAR2(9)
MGR                                                             NUMBER(4)
HIREDATE                                                  DATE
SAL                                                               NUMBER(7,2)
COMM                                                          NUMBER(7,2)
DEPTNO                                                     NUMBER(2)

If you want to view the data stored in all the columns then use

Select * from table-name
Eg:
select * from emp;

<<Previous  Next>>



Write your comment - Share Knowledge and Experience


 

 
Interview questions
Latest MCQs
» General awareness - Banking » ASP.NET » PL/SQL » Mechanical Engineering
» IAS Prelims GS » Java » Programming Language » Electrical Engineering
» English » C++ » Software Engineering » Electronic Engineering
» Quantitative Aptitude » Oracle » English » Finance
Home | About us | Sitemap | Contact us | We are hiring