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

What is raw datatype in sql?

548


What is dml statement?

515


how to select unique records from a table? : Sql dba

628


What is audit logout in sql profiler?

585


What is a full join sql?

591






Is sqlite good enough for production?

531


What is exception? What are the types of exceptions?

554


What is a field in a database?

566


What is cascade in sql?

559


Is sql a dbms?

528


What is the location of pre_defined_functions.

642


How subquery works in sql?

539


What is a pragma statement?

717


What is normalisation and its types?

544


Is the primary key an index?

595