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



Let us suppose we have a table with structure in order empno empname empdesig empcountry an..

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

Let us suppose we have a table with structure in order empno empname empdesig empcountry an..

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

Let us suppose we have a table with structure in order empno empname empdesig empcountry an..

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

Post New Answer

More SQL PLSQL Interview Questions

Is sql developer case sensitive?

0 Answers  


Explain the order of sql statement execution?

0 Answers  


How do sql databases work?

0 Answers  


When is the update_statistics command used?

0 Answers  


A table was given with 3 columns like Manager id,Manager Name and Employee name. Question was to create hierarchy.

2 Answers   TCS,






Is it possible to link two groups inside a cross products after the cross products group has been created?

0 Answers  


Explain the difference between sql and mysql.

0 Answers  


how to enter binary numbers in sql statements? : Sql dba

0 Answers  


I have a Employee table with columns ename,eid,salary,deptno. How to retrieve sum of salary for each deptno?

8 Answers   L&T,


How do you exit in sql?

0 Answers  


what is the difference between stored procedure and packaged procedure

1 Answers   Google, Infosys,


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

0 Answers  


Categories