Share

Search Database SQL / Scripts


  Help us in improving the repository. Add new Queries/Scripts through 'Submit Database SQL / Scripts ' link.





Database SQL / Scripts for '#Alter' - 5 Query/Script(s) found

 Sample 1. Oracle - Add New Date Column to a Table

ALTER TABLE TABLE_NAME
ADD NEW_COLUMN DATE;

   Like      Feedback     DDL  alter table  add a column   add a new column  sql


 Sample 2. Drop a Constraint from a Table

ALTER TABLE TABLE_NAME
DROP CONSTRAINT CONSTRAINT_NAME;

   Like      Feedback     drop a constraint  ALTER  DROP CONSTRAINT  DDL


 Sample 3. Add Primary Key constraint to a Table

ALTER TABLE TABLE_NAME
ADD CONSTRAINT CONSTRAINT_NAME primary key (COLUMN_NAME);

   Like      Feedback     Add Primary Key Constraint  Constraint  Alter Table  Alter  ADD CONSTRAINT   DDL


 Sample 4. Add New Date Column with Comment

ALTER TABLE_NAME
ADD COLUMN_NAME DATE;
COMMENT ON COLUMN TABLE_NAME.COLUMN_NAME IS 'Date Column for xyz';

   Like      Feedback     Add Column with comment  Add a Column with comment  Add Column  Alter  Comment  COMMENT ON COLUMN


Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner
 Sample 5. Adding Composite Key as Primary Key

ALTER TABLE TABLE_NAME
ADD CONSTRAINT CONSTRAINT_NAME primary key (COLUMN_1_NAME,COLUMN_2_NAME );

   Like      Feedback     composite primary key   primary key  alter  alter table  constraint  add constraint



Subscribe to Java News and Posts. Get latest updates and posts on Java from Buggybread.com
Enter your email address:
Delivered by FeedBurner



comments powered by Disqus