Dennis Gearon wrote:

Please CC me, I am on digest.

What is an int(11) as in the following table creation statement? I looked online at the documentation, and not only is the documentation MUCH different than the last time I looked at it, (been awhile), but I didn't see anything related to a parameter to the size of an int field that looked like 11.

BTW, why does the make of the definition below have backtick quotes on all names?

CREATE TABLE  calendar_events` (
                             `eventID` int(11) NOT NULL auto_increment,
                             `eventTitle` varchar(20) default NULL,
                             `eventMessage` varchar(200) default NULL,
                             `eventTime` time default NULL,
                             `eventDate` date default NULL,
                             PRIMARY KEY  (`eventID`)
                           ) TYPE=MyISAM;

As far as I know, the number in brackets eg int(11) is only used for numeric fields when you are importing from a fixed-width text file, with 'load data infile'. In this case, the width of the fields is taken from the number in brackets from the table definition. Pretty strange stuff if you ask me. Anyway you can safely ignore it if you're not importing data from a fixed-width file. For more info see 'load data infile'.


The backticks are there to aid MySQL in parsing the string later in case you have used reserved words or strange characters.

--
Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: [EMAIL PROTECTED]
website: http://www.nusconsulting.com.au

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to