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

How we can create a table in pl/sql block. Insert records into it? Is it possible by some procedure or function? Please give example?

758


What is the purpose of my sql?

684


What is difference between nchar and nvarchar?

695


Differentiate pl/sql and sql?

741


How to assign sql query results to pl sql variables?

674






What are inner and outer joins examples of both?

691


How can a pl sql block be executed?

680


What are pl sql data types?

726


How do you respond to dementia behavior?

720


How to run sql commands in sql*plus?

786


How exception is different from error?

762


what are the advantages of mysql in comparison to oracle? : Sql dba

704


What are aggregate functions in sql?

840


Explain about various levels of constraint.

700


Which is faster view or stored procedure?

690