Jump to content

Calling SQL developers


Recommended Posts

Posted

this is for taking NULL value by default

ALTER TABLE (table name)
ADD CONSTRAINT (give some name like metadata_store_default)
DEFAULT NULL FOR metadata_store
GO

_________________________________________________________________________
and a 3values kosam use this

ALTER TABLE (table name)
ADD CONSTRAINT (constarint name like cc_metasata_store what ever u like )
CHECK (metadata_store IN ('ETA', 'ETA_LEGACY', 'AIDW'));

hope it will work sSa_j@il sSa_j@il

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

  • bongule

    21

  • pillabachapk

    14

  • nenuinthe

    7

  • Ranga_The_Donga

    7

Popular Days

Top Posters In This Topic

Posted

[quote author=Nemo link=topic=156607.msg1857598#msg1857598 date=1297894020]
trying baa...doubt vaste wil ask u  sHa_fr1ends
[/quote]
aa constraint last lo IS  NULL condition include chesi chudu....sHa_fr1ends

Posted

[quote author=manoghna link=topic=156607.msg1857569#msg1857569 date=1297893622]
sCo_hmmthink sCo_hmmthink sCo_hmmthink
so a 3 values kakapothe null value tesukovala a column?
ithe default constraint with null kooda add cheyalemo a cloumn ki let me check...
[/quote][quote author=Pilloduuuuuu link=topic=156607.msg1857571#msg1857571 date=1297893659]
nemo oka solution cheptaa....i donno whether it will work first aa column create cheyiii....tarvata alter table script raayi...NULL allow chestuuu
[/quote]
no worries...nenu not null ani pettakunda...constraint lo 3 values icha..its taking null as well as these 3 values only..so ee question tho no problem

Posted

ee simple trigger ee pani cheyyatledhu baa enduko

create trigger id_trigger
before insert on ITEM_TYPES
for each row
begin
select id_seq.nextval into :new.id from dual;
end;

Posted

[quote author=manoghna link=topic=156607.msg1857615#msg1857615 date=1297894295]
this is for taking NULL value by default

ALTER TABLE (table name)
ADD CONSTRAINT (give some name like metadata_store_default)
DEFAULT NULL FOR metadata_store
GO

_________________________________________________________________________
and a 3values kosam use this

ALTER TABLE (table name)
ADD CONSTRAINT (constarint name like cc_metasata_store what ever u like )
CHECK (metadata_store IN ('ETA', 'ETA_LEGACY', 'AIDW'));

hope it will work sSa_j@il sSa_j@il
[/quote]
nenu anukunnadi ide....using alter table...

Posted

[quote author=Pilloduuuuuu link=topic=156607.msg1857624#msg1857624 date=1297894373]
nenu anukunnadi ide....using alter table...
[/quote]
this is working fine baa

create table ITEM_TYPES
( id number(5),
short_name varchar2(4) ,
name varchar2(20) ,
description varchar2(200) not null,
contains_images  varchar2(1) not null,
metadata_store  varchar2(15),
deprecation_date date,
decommission_date date,
CONSTRAINT cc_metasata_store CHECK (metadata_store IN ('ETA', 'ETA_LEGACY', 'AIDW')),
primary key(id,short_name,name)
);

Posted

[quote author=Nemo link=topic=156607.msg1857627#msg1857627 date=1297894429]
this is working fine baa

create table ITEM_TYPES
( id number(5),
short_name varchar2(4) ,
name varchar2(20) ,
description varchar2(200) not null,
contains_images  varchar2(1) not null,
metadata_store  varchar2(15),
deprecation_date date,
decommission_date date,
CONSTRAINT cc_metasata_store CHECK (metadata_store IN ('ETA', 'ETA_LEGACY', 'AIDW')),
primary key(id,short_name,name)
);
[/quote]

hammayyaaaaa ipatiki aachhinda ..ushhhhh

Posted

[quote author=Nemo link=topic=156607.msg1857627#msg1857627 date=1297894429]
this is working fine baa

create table ITEM_TYPES
( id number(5),
short_name varchar2(4) ,
name varchar2(20) ,
description varchar2(200) not null,
contains_images  varchar2(1) not null,
metadata_store  varchar2(15),
deprecation_date date,
decommission_date date,
CONSTRAINT cc_metasata_store CHECK (metadata_store IN ('ETA', 'ETA_LEGACY', 'AIDW')),
primary key(id,short_name,name)
);
[/quote] ^^" ^^" ^^" ^^" ^^"

Posted

[quote author=Pilloduuuuuu link=topic=156607.msg1857624#msg1857624 date=1297894373]
nenu anukunnadi ide....using alter table...
[/quote]avuna ok....  sHa_high5ing sHa_high5ing

Posted

[quote author=Nemo link=topic=156607.msg1857622#msg1857622 date=1297894361]
ee simple trigger ee pani cheyyatledhu baa enduko

create trigger id_trigger
before insert on ITEM_TYPES
for each row
begin
select id_seq.nextval into :new.id from dual;
end;
[/quote]
error emani vastundii

×
×
  • Create New...