MySQL Forums
Forum List  »  Newbie

create table with more than one field
Posted by: Rob R
Date: June 11, 2009 07:02PM

Wow..talk about help with the most basic stuff. I can't even get my first table into MySQL 5 on Ubuntu unless it has a single field in it.

Using Mysql admin tool, this sql creates a table with a single field for me.

CREATE TABLE `consignment`.`test` (
`cnum` INTEGER NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`cnum`)
)
ENGINE = MyISAM;

Using the same tool, if I create a new identical table except with one more field it fails.

CREATE TABLE `consignment`.`consignors` (
`cnum` INTEGER NOT NULL AUTO_INCREMENT,
`fname` VARCHAR NOT NULL,
PRIMARY KEY (`cnum`)
)
ENGINE = MyISAM;

It complains about the NOT NULL section, but I've tried it both with and without NOT NULL. Please get me started.

Options: ReplyQuote


Subject
Written By
Posted
create table with more than one field
June 11, 2009 07:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.