I'm trying to add some data validation / integrity checks to an oracle database, I always get the error message "Constraint specification not allowed here"
Example:
create table student (
sex char(1) not null
constraint checksex ( sex in ('m', 'M', 'f', 'F', ));
This will give me - "ERROR at line 3: ORA-02253: constraint specification not allowed here"
I realise this is probably a basic question but im not having much luck finding out where I?m going wrong, if someone could point me in the right direction that would be great, Thank:):)
Question
+InsaneNutter MVC
I'm trying to add some data validation / integrity checks to an oracle database, I always get the error message "Constraint specification not allowed here"
Example:
create table student (
sex char(1) not null
constraint checksex ( sex in ('m', 'M', 'f', 'F', ));
This will give me - "ERROR at line 3: ORA-02253: constraint specification not allowed here"
I realise this is probably a basic question but im not having much luck finding out where I?m going wrong, if someone could point me in the right direction that would be great, Thank:):)
Link to comment
Share on other sites
2 answers to this question
Recommended Posts