Pada Tue, 27 Aug 2002 01:09:32 +0000
"Will K." <[EMAIL PROTECTED]> menulis :

> hello,
> 
> Please dont tell me to RTFM on this one (cause I am already doing that), but 
> for clarity's sake... can someone tell me what it means when you use NULL 
> and NOT NULL in a query (specifically CREATE TABLE)?  Also, when should I 
> use them?

NULL mean empty value ... it's different if you insert value with "" ...

for example, you don't want to allow any record which doesn't have anything in 
firstname field.
then you can define the field on table creation : firstname varchar not null

try to  : insert into <table> (firstname) values (NULL); select * from <table> where 
firstname is NULL;

-- 
Write clearly - don't be too clever.
            - The Elements of Programming Style (Kernighan & Plaugher)
 
MySQL 3.23.51 : up 66 days, Queries : 356.880 per second (avg).

--
Dicky Wahyu Purnomo - System Administrator
PT FIRSTWAP : Jl Kapt. Tendean No. 34 - Jakarta Selatan 12790
Phone : +62 21 79199577 - HP : +62 8551044244 - Web : http://www.1rstwap.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to