Difference between revisions of "MySQL"

Jump to navigation Jump to search
271 bytes added ,  08:30, 23 December 2009
m
→‎Data Types: Added NULL
m (Added "Basic Commands")
m (→‎Data Types: Added NULL)
Line 28: Line 28:


== Data Types ==
== Data Types ==
=== NULL ===
NULL means "no data", it doesn't mean zero.  Therefore 0 <> NULL in an numerical field, and "NULL" <> NULL in a string field.
To set a field to NULL, use NULL without any quotes eg...
* <code> INSERT INTO table (col1, col2) VALUES ('data1', NULL); </code>
=== IP Addresses ===
=== IP Addresses ===
IP addresses are most efficiently stored as an UNSIGNED INT, though obviously this isn't particularly human readable.   
IP addresses are most efficiently stored as an UNSIGNED INT, though obviously this isn't particularly human readable.   

Navigation menu