| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Rodrigo Sakai | Date: | May 20 2005 10:49pm |
| Subject: | constraints | ||
| View as plain text | |||
Hi, I need to do a constraint that checks if the field 'salary' of one table is not
smaller than zero. Like:
create table employee (
name varchar(30),
salary numeric(10,2)
constraint ck_salary check (salary > 0)
);
What´s the sintaxe? I'am not finding the correct sintaxe to do this constraint.
I'm using MySQL 4.1
| Thread | ||
|---|---|---|
| • constraints | Rodrigo Sakai | 21 May |
| • Re: constraints | Rhino | 21 May |
| • Re: constraints | mfatene | 21 May |
| • Re: constraints | Michael Stassen | 21 May |
| • Re: constraints | mfatene | 21 May |
| • Re: constraints | Peter Brawley | 21 May |
