daily pastebin goal
22%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Drop Unique Key and generate new unique key
  2. CREATE TABLE wsc_widget_bundle (
  3.     id VARCHAR (50),
  4.     widgetBundle BLOB NULL,
  5.     devicesoftwareclass VARCHAR(30) NOT NULL,
  6.     widgetProfileId VARCHAR (50) NOT NULL,
  7.     bundleHash BLOB NULL,
  8.     widgetLocale VARCHAR (6) NOT NULL ,
  9.     status INT,  
  10.         primary key(id),
  11.         unique(widgetProfileId, devicesoftwareclass,status),
  12.     foreign key(widgetProfileId) references wsc_widget_profile(id)
  13.   );
  14.    
  15. create table "MTP440_DEV1"."WSC_WIDGET_BUNDLE"(
  16.     "ID" VARCHAR2(50) not null,
  17.    "WIDGETBUNDLE" BLOB,
  18.    "DEVICESOFTWARECLASS" VARCHAR2(30) not null,
  19.    "WIDGETPROFILEID" VARCHAR2(50) not null,
  20.    "BUNDLEHASH" BLOB,
  21.    "WIDGETLOCALE" VARCHAR2(6) not null,
  22.    "STATUS" NUMBER,
  23.     constraint "SYS_C00323290" primary key ("ID")
  24. );
  25.  
  26. alter table "MTP440_DEV1"."WSC_WIDGET_BUNDLE"  
  27.     add constraint "SYS_C00323292"
  28.     foreign key ("WIDGETPROFILEID")
  29.     references "MTP440_DEV1"."WSC_WIDGET_PROFILE"("ID");
  30. create unique index "MTP440_DEV1"."SYS_C00323290" on "MTP440_DEV1"."WSC_WIDGET_BUNDLE"("ID");
  31. create unique index "MTP440_DEV1"."SYS_C00323291" on "MTP440_DEV1"."WSC_WIDGET_BUNDLE"("WIDGETPROFILEID","DEVICESOFTWARECLASS","STATUS");
  32. create index "MTP440_DEV1"."TEST" on "MTP440_DEV1"."WSC_WIDGET_BUNDLE"("DEVICESOFTWARECLASS","STATUS","WIDGETLOCALE","WIDGETPROFILEID");
  33.    
  34. Alter table x
  35. drop constraint pk;
  36.  
  37. Alter table x
  38. add constraint New_constraint_name PRIMARY KEY (colname);
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top