While using Create table condition how can i give a specific numeric value to a column
Column Name: Quantity
Data Type: NUMBER(4)
Constraints: Greater than or equal to 0;
Default Value is 0
While using Create table condition how can i give a specific numeric value to a column
Column Name: Quantity
Data Type: NUMBER(4)
Constraints: Greater than or equal to 0;
Default Value is 0
You mean something like this?:
create table mytable (
quantity number(4) default 0
);
alter table mytable
add (constraint chkQuantity check (quantity >= 0) enable validate);