-
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)
-
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
-
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)
);
-
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