Go Back   Access World Forums > Apps and Windows > Web Design and Development > PHP & MySQL

Thread Tools Rate Thread Display Modes
Old 05-25-2013, 06:14 AM   #1
Newly Registered User
Join Date: Apr 2013
Location: Kathmandu, Nepal
Posts: 10
Thanks: 3
Thanked 0 Times in 0 Posts
RajaGautam is on a distinguished road
Check Constraint in MySQL

Hi! everyone i have check constraint example like this:

create table persons
P_Id int not null,
LastName varchar(255) not null,
FirstName varchar(255),
Address varchar(255),
City varchar(255),
CHECK (P_Id>0)

The above example run successfully but it allow me to input P_Id to 0 which is against the condition. Why it is happening? I take this example from w3school.

RajaGautam is offline   Reply With Quote


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a check constraint with SQL kcarpy Tables 10 09-30-2009 10:33 PM
FK Constraint Pauldohert SQL Server 0 07-26-2006 05:05 AM
How to add feild size and null constraint check to this vba tony007 Modules & VBA 0 08-15-2005 12:36 PM
Problem with check constraint Chunk Tables 3 03-15-2005 01:14 AM
Table constraint Chunk Tables 2 02-25-2005 03:05 PM

All times are GMT -8. The time now is 03:32 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World