Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to create a duplicate of a table without copying the data
On 4 Sep 1998 23:34:19 GMT, "Vishy Ram"
<vram_at_interaccess.com> wrote:
>I am trying to create a temptable which is a duplicate of an existing
>table. However
>I do not want any data from the master. Just the table definition of the
>master. So I
>cannot use the Create Table as Select clause. Can anyone suggest a better
>way.
This just occurred to me, and I havn't tested it.
create duplicate_table as
select * from original_table
where 2 = 3;
I also believe it will force a full tablescan of the original table, so be careful. The where condition should never be satisfied, so no rows will go to the new table from the old.
regards,
Jonathan Received on Sat Sep 05 1998 - 18:35:01 CDT
![]() |
![]() |