Let us suppose we have a table with structure in order

empno
empname
empdesig
empcountry

and now i want to re-organize the columns of this table to

empno
empdesig
empname
empcountry

how can i do this with queries ?

assume that table contains the data.

Answer Posted / s. syam sundar

try this

create table emp1 as select
empno,empdesig,empname,empcountry from emp


this would creat a new table named as emp1 and
u can retrive the data from this table as of emp
but constraints,indexs which u have on emp table are
created on this emp1 table

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why is %isopen always false for an implicit cursor?

568


What is trigger and how to use it in sql?

538


What are the differences between implicit and explicit cursors?

517


What is the maximum number of columns in sql table?

549


Which join condition can be specified using on clause?

514






Is coalesce faster than isnull?

506


How would you reference column values before and after you have inserted and deleted triggers?

620


What is synonyms?

573


Describe sql comments?

559


What is trigger types of trigger?

550


Can we join 3 tables in sql?

498


Explain the insert into statements in sql?

565


Write a query to display the current date in sql?

511


Explain the components of sql?

587


What is varray in pl sql?

566