SQL

i have got a table below

CREATE TABLE ABDEBTP (
  ABP3CG  CHAR          (10)     NOT NULL,
  ABMRTA  CHAR          (40)     NOT NULL ) ON [Data]


please help , i want to modify the columns on the  existing  table   above to be like the below


CREATE TABLE ABDEBTP (
    ABP3CG  CHAR     (10)      DEFAULT ' ' NOT NULL,
    ABMRTA  CHAR     (40)      DEFAULT ' ' NOT NULL) ON [DATA]


please helpme write the script
the script below is for oracle ,please help me write one for SQL 2000


ALTER TABLE ABDEBTP MODIFY ABP3CG DEFAULT ' ';

ALTER TABLE ABDEBTP MODIFY ABMRTA DEFAULT ' ';
RichardsoetAsked:
Who is Participating?
 
MannaraprayilCommented:
DF_ABDEBTP_ABP3CG is a name just gived for the constraint
0
 
mokuleCommented:
ALTER TABLE ABDEBTP ADD CONSTRAINT [DF_ABDEBTP_ABP3CG] DEFAULT ' ' FOR [ABP3CG]
ALTER TABLE ABDEBTP ADD CONSTRAINT [DF_ABDEBTP_ABMRTA] DEFAULT ' ' FOR [ABMRTA]
0
 
mokuleCommented:
Better in paranthesis
ALTER TABLE ABDEBTP ADD CONSTRAINT [DF_ABDEBTP_ABP3CG] DEFAULT (' ') FOR [ABP3CG]
ALTER TABLE ABDEBTP ADD CONSTRAINT [DF_ABDEBTP_ABMRTA] DEFAULT (' ') FOR [ABMRTA]
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
RichardsoetAuthor Commented:
could you please tell me where DF_ is coming from is it default by SQL 2000
0
 
RichardsoetAuthor Commented:
thanks , could you please help me convert the below oracle trigger to sql trigger


PROMPT  TRIGGER FA_Trigger:
create sequence fa_seq;
 
create or replace trigger fa_trigger before insert on fadebtp for each row
begin
if ( :new.faeyne is null ) then
select fa_seq.nextval into :new.faeyne from dual;
end if;
end;
/
0
 
mokuleCommented:
Sorry, but it is completely new question
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.