Databases :: Oracle :: oracle problem with "CREATE TABLE tablename LIKE othertable" |
|||
| By: Bernard |
Date: 11/04/2008 11:27:26 |
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 | Type : Answer |
|
| the solution is to do : create table tablename as select * from othertable where 1=2; |
|||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








