visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
262 experts, 1140 registered users, 1616 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

We now celebrate our 5 years of existence and break our frequentation records... Here are the stats of those 5 years.

Databases :: Oracle :: oracle problem with "CREATE TABLE tablename LIKE othertable"


By: Bernard France  Date: 11/04/2008 11:27:26  English  Points: 20 Status: Answered
Quality : Excellent
I saw that Oracle (at least, the old Sql*Plus client program) has a LIKE operator for column formatting :

COL owner LIKE grantee


So Oracle has some intelligent extra features over standard SQL.

But I was wondering how to do a "CREATE TABLE tablename LIKE othertable" in Oracle. This very handy feature is available in MySql server.
By: VGR Date: 11/04/2008 11:29:07 English  Type : Answer
the solution is to do :

create table tablename as select * from othertable where 1=2;


Do register to be able to answer

 Add This Article To:
 del.icio.usDel.icio.us  diggDigg  googleGoogle  spurlSpurl
 blinkBlink  wongWong  simpySimpy  yahooY! MyWeb 
EContact
browser fav
page generated in 4761.306050 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page