All Forums UDA
Anand.Louis 2 posts Joined 09/11
29 Dec 2011
I want to copy structure of a SET table to a New table as MULTISET. Is there any way we can do this?

 

I want to copy structure of a SET table to a New table as MULTISET. Is there any way we can do this? 

bwb 12 posts Joined 12/10
29 Dec 2011

Sure. Simply use:

CREATE MULTISET TABLE <new-multiset-table> AS <existing-set-table>;

If the existing table has any UNIQUE indexes (or other UNIQUE constraints), you'll probably want to override them.

For more information, see:

  • Chapter 5 (CREATE TABLE) of SQL Data Definition Language - Syntax and Examples (B035-1144) for the basic syntactic information, and
  • The CREATE TABLE (AS Clause) section of chapter 5 (CREATE TABLE) of SQL Data Definition Language - Detailed Topics (B035-1184) for about 15 pages of more comprehensive information.
rk_theprince 7 posts Joined 05/10
01 Jan 2012

Go to the DDL of the SET table using SHOW command, copy that whole statement, replace SET with MULTISET with a new table name.

You must sign in to leave a comment.