Wrox Programmer Forums
|
BOOK: Beginning SQL
This is the forum to discuss the Wrox book Beginning SQL by Paul Wilton, John Colby; ISBN: 9780764577321
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning SQL section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 4th, 2007, 07:49 PM
Authorized User
 
Join Date: Dec 2003
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter4, check

CREATE TABLE NamesAndAge
(
 Names varchar(50),
 Age int CHECK (Age >= 0)
);
INSERT INTO NamesAndAge(Names,Age) VALUES('Tom',22);
INSERT INTO NamesAndAge(Names,Age) VALUES('Mark',-30);

CHECK in this table doesn't work. I could insert +22 and -30...
Why?
My DB MySQL version: 5.0.22-Debian_0ubuntu6.06.3-log
Maybe my DB is badly configured?


 
Old July 24th, 2008, 01:46 PM
Registered User
 
Join Date: Jul 2008
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Wouldn't it be much simpler to use the "UNSIGNED" keyword?

http://www.myetymology.com --word etymology website





Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect to VSS check-in Check-out Programatically rhd110 General .NET 6 August 12th, 2007 07:46 AM
Chapter4 - Raising Event KellyR Access VBA 0 June 11th, 2007 08:50 PM
chapter4 xsl and xpath problem clinfix BOOK: Professional Ajax ISBN: 978-0-471-77778-6 1 August 8th, 2006 02:21 PM
Try it out chapter4 p112 chochadoobie BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 2 February 9th, 2006 02:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.