List:General Discussion« Previous MessageNext Message »
From:Rhino Date:May 20 2005 11:02pm
Subject:Re: constraints
View as plain text  
Are you sure this kind of constraint is supported in MySQL 4.1?

I'm not saying they aren't, I just don't remember. Unless you're sure they
are, you should check the manual.

Rhino

----- Original Message ----- 
From: "Rodrigo Sakai" <rodrigo.sakai@stripped>
To: <mysql@stripped>
Sent: Friday, May 20, 2005 6:49 PM
Subject: constraints


  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


----------------------------------------------------------------------------
----


No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.12 - Release Date: 17/05/2005



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.322 / Virus Database: 266.11.12 - Release Date: 17/05/2005

Thread
constraintsRodrigo Sakai21 May
  • Re: constraintsRhino21 May
    • Re: constraintsmfatene21 May
      • Re: constraintsMichael Stassen21 May
        • Re: constraintsmfatene21 May
      • Re: constraintsPeter Brawley21 May