-
February 25th, 2003, 05:58 PM
#1
Senior Member
sqlplus-need help
This is my table. I need to add a null constraint using alter table.
alter table gradstudent
add constraint gradstudent_sfname_nn not null(s_fname);
alter table gradstudent
add constraint gradstudent_slname_nn not null(s_lname);
What am I doing wrong? Is it possible to put it in one statement?
Name Null? Type
----------------------------------------- -------- ----------------------------
S_ID NUMBER(3)
S_LAST VARCHAR2(10)
S_FIRST VARCHAR2(10)
S_MI CHAR(1)
S_ADD VARCHAR2(25)
-
February 25th, 2003, 06:24 PM
#2
hum, are you specifying the right column name in your add constraints?
s_fname, s_lname are not the same as S_LAST and S_FIRST of your select...
Ammo
Credit travels up, blame travels down -- The Boss
-
February 25th, 2003, 06:33 PM
#3
Senior Member
yes, the database just prints everythimg in caps.
Here is my table part of the script. Would it be better to use a modify statement?
create table student
(
s_id number(3),
s_last varchar2(10),
s_first varchar2(10),
s_mi char(1),
s_add varchar2(25)
);
-
February 25th, 2003, 07:07 PM
#4
that's my point, it's not just diffrent caps, one is "s_last" the other is "s_lname"! Same with "s_first" and "s_fname"...
Ammo
Credit travels up, blame travels down -- The Boss
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|