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
How can we solve sql error: ora-00904: invalid identifier?
how mysql optimizes distinct? : Sql dba
What are the differences between implicit and explicit cursors?
List the ways to get the count of records in a table?
Why is stored procedure faster than query?
Why use subqueries instead of joins?
How do I run sql?
Does pl sql work in mysql?
What is serial sql?
Is sql better than excel?
what is the difference between undefined value and null value? : Sql dba
How do you determine the current isolation level? : Transact sql
how do you control the max size of a heap table? : Sql dba
What is pl/sql table? Why it is used?
Can we rename a column in the output of sql query?