whats wrong with this

i’m trying to create a table with this through sql in myphp

CREATE TABLE pet (
petID SERIAL
petName VARCHAR (25) NOT NULL,
)

but it says this:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘petName VARCHAR (25) NOT NULL, )’ at line 3

what am i doing wrong, i have copyed out of book! is the book out of date with sql?

may thanks

alix

if you have phpmyadmin, why are you trying to do it through sql?

should be something like

CREATE TABLE `pet` (
`petID` INT(11) NOT NULL,
`petName` VARCHAR (25) NOT NULL
) 

aha

thanks

well im learning this stuff and it says one way to do it is through the sql

thanks

Sponsor our Newsletter | Privacy Policy | Terms of Service