GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Certification  >  Oracle
Go To First  |  Previous Question  |  Next Question 
 Oracle  |  Question 62 of 63    Print  
How we can insert the structure of given table in another table?

  
Total Answers and Comments: 6 Last Update: May 13, 2008     Asked by: daulat 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
January 09, 2007 23:23:47   #1  
spanchi Member Since: December 2006   Contribution: 1    

RE: How we can insert the structure of given table in ...
If using a RDBMS such as oracle try using database objects.

 
Is this answer useful? Yes | No
January 17, 2007 00:40:30   #2  
lalit4untl Member Since: January 2007   Contribution: 4    

RE: How we can insert the structure of given table in ...

hi

try this this will copy only the structure of table 2 into table 1 not the data.........

insert into table1 select * from table2 where 1 2;

bye....


 
Is this answer useful? Yes | No
February 28, 2007 02:31:54   #3  
geeth        

RE: How we can insert the structure of given table in ...
hi

try this


create table <table_name> as select * from xxx where 1 2

 
Is this answer useful? Yes | No
March 14, 2007 03:37:44   #4  
chandu        

RE: How we can insert the structure of given table in ...
table1 select * from table2
 
Is this answer useful? Yes | No
December 24, 2007 00:42:49   #5  
mala321 Member Since: December 2007   Contribution: 6    

RE: How we can insert the structure of given table in another table?
Hello

Try this

Create table <t1> as select * from <table2> where 3 4;

bye



 
Is this answer useful? Yes | No
May 09, 2008 09:04:39   #6  
rajiv.sriraj Member Since: May 2008   Contribution: 3    

RE:
HI if u want to get the same table structure which is already existing in ur database then SQL QUERY IS create table <table name> as select * from <table name which is already in DB> where 1 2;

If u want data also then
create table <table name> as select * from <table name which is already in DB> ;

 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape