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.
Answers were Sorted based on User's Feedback
Answer / jyothi
there is only one way to to re-arrange the table
that is views...
create view <view-name>as select <fields> from <tablename>
.........
for example..
create view vw as select empno,empdesig,empname,empcountry
from <tablename>...
(u can get message that is view created)
just display the data using viewname(vw)..
Is This Answer Correct ? | 2 Yes | 0 No |
Answer / 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 |
Answer / bala
try updating the values for COLUMN_ID in the
ALL_TAB_COLUMNS table..using Admin Privilege. to update
this table...
Is This Answer Correct ? | 1 Yes | 2 No |
What does sign mean sql?
What is difference between left and right outer join?
Can you select everything, but 1 or 2 fields, without writer's cramp?
How delete all records from table in sql?
Is progress software supports to ( pl/sql )?
what is text? : Sql dba
how to load data with out header and footer records in a database using sql*loader? pls tell me the answer urgently
How do I save a sql query?
How does postgresql compare to oracle/db2/ms sql server/informix?
What is the use of stored procedures?
use of IN/ANY/ALL
What information is needed to connect sql*plus an oracle server?