Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DESCRIBE TABLE question

Status
Not open for further replies.

leegold

Technical User
Mar 19, 2002
39
US
In the default col. there's a NULL. Page_id field is my PK and I didn't create it with NULL as a default - what does the "NULL" mean. The table seems to work fine - but I'm sure I never mentioned NULL in association with the auto-increment PK field...? Thanks

mysql> describe page;
+----------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+----------+------------------+------+-----+---------+----------------+
| page_id | int(10) unsigned | | PRI | NULL | auto_increment |
| page_url | varchar(200) | | | | |
| title | varchar(200) | | | | |
+----------+------------------+------+-----+---------+----------------+
3 rows in set (0.00 sec)
 
This is a question better-suited in the MySQL AB: MySQL forum, but...

If you create the table like this, you won't have that NULL keyword showing in your DESCRIBE results.

[tt]
CREATE TABLE page (
page_id int(10) unsigned not null auto_increment,
page_url varchar(200) not null,
title varchar(200) not null,
PRIMARY KEY (page_id)
)
[/tt]

*cLFlaVA
----------------------------
A pirate walks into a bar with a huge ship's steering wheel down his pants.
The bartender asks, "Are you aware that you have a steering wheel down your pants?"
The pirate replies, "Arrrrr! It's driving me nuts!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top