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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we join tables without foreign key?

530


What are properties of the transaction?

568


How do you write a subquery?

533


What is the use of sqlerrd 3?

533


What are the advantages of indexing?

536






Explain constraints in sql?

579


explain mysql aggregate functions. : Sql dba

556


What is difference between stored procedures and application procedures?

584


Can we create foreign key without primary key?

546


What are the main features of cursor?

638


how many tables will create when we create table, what are they? : Sql dba

551


what is oracle database ? : Sql dba

569


Which command is used to delete a package?

588


What is sql architecture?

567


What is sql dialect?

537