Back To Normal

Subscribe To Our E-Mail Newsletter

Thursday, April 8, 2010

How to copy the table in oracle?


Couch ModePrint It

  •  Copy the table structure with data
        create table emp_copy as
          select *
            from Employee;

  •   Copy the table structure with out data  
            CREATE TABLE Table2 AS 
               SELECT * FROM Table1 WHERE 1=0;
       Note: if condition is not validating then it wont copy the data. 
  •  Copying selected columns from another table
                   CREATE TABLE newTable
                        AS (SELECT empno, ename
                                    FROM emp);

Click Here For Smileys :D
:D
:)
:[
;)
:D
:O
(6)
(A)
:'(
:|
:o)
8)
(K)
(M)

No comments:

560 Free Online Courses

Top 200 universities launched 500 free online courses.  Please find the list here .