Click to See Complete Forum and Search --> : SQL error why?


mitchell
11-24-2007, 08:30 PM
i cant make my alliance table because it keeps saying an error:

CREATE TABLE `aliance` (
`id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`name` VARCHAR( 11 ) NOT NULL ,
`leader` VARCHAR( 11 ) UNSIGNED NOT NULL DEFAULT 'leader',
`member` VARCHAR( 11 ) UNSIGNED NOT NULL DEFAULT 'member'
) ENGINE = MYISAM

MySQL said: Documentation
#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 'UNSIGNED NOT NULL DEFAULT 'leader', `member` VARCHAR(11) UNSIGNED NOT NULL DEFAU' at line 1

h3r0
11-24-2007, 08:36 PM
You know that you spelled the table name 'aliance' and not 'alliance' right? This might cause some confusion down the road.

NogDog
11-24-2007, 09:43 PM
VARCHAR columns cannot be UNSIGNED.