Skip to Main Content

SQL & PL/SQL

Alter Table Add column not null default value

732390Dec 10 2009 — edited Dec 10 2009
I want to add two columns to a table with not null and default as 0 for both columns
Can i write the whole in one statement or do i have to split statement
I tried this, but didn't work

alter table DWSODS01.DWT00301_ORD_DTL_OMS add (
COMB_ORD_FLG NUMBER(5,0) default 0 not null,
COMB_ORD_NO NUMBER(12,0)
default 0 not null);

How can i modify the code?
This post has been answered by Solomon Yakobson on Dec 10 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2010
Added on Dec 10 2009
35 comments
240,650 views