Hi Jim,
Only difference is auto increment in the field.
You cannot have two auto increment in a single table also auto
increment field must be the key.
On 11/30/09, Jim Lyons wrote:
> I created dummy tables for Roles and Users specifying the primary keys as
> 'serial' and then tried the below sy
I created dummy tables for Roles and Users specifying the primary keys as
'serial' and then tried the below syntax. It failed.
Then I redefined the primary keys in the parent tables to be the exact same
type as the foreign keys in UserRole and it worked.
So, check the datatype of all your keys a
Thanks Liu, This type mismatch issue.
On 10/5/09, LIU YAN wrote:
>
> hi,
>
>
>
> I run your code , but worked propertly. I suggested to check the table USERS
> , ROLES, is the column userid / roleid same data type (INT(10) UNSIGNED )
> with your userroles table ?
>
>
>
>
hi,
I run your code , but worked propertly. I suggested to check the table USERS ,
ROLES, is the column userid / roleid same data type (INT(10) UNSIGNED ) with
your userroles table ?
==
mysql> create table users (userid INT(10) UNSIGNE
What is the exact error you are getting?
John Daisley
MySQL & Cognos Contractor
Certified MySQL 5 Database Administrator (CMDBA)
Certified MySQL 5 Developer (CMDEV)
IBM Cognos BI Developer
Telephone +44 (0)7812 451238
Email j...@butterflysystems.co.uk
-Original Message-
From: Sharique
Have you verified the syntax from the MySQL command line?
-Original Message-
From: Marvin Cummings
To: [EMAIL PROTECTED]
Sent: 5/9/04 7:26 PM
Subject: Error creating table in MySQL 5.0
Wondering if anyone can give me some help with this error I'm getting
when trying to create this table:
If a column is auto_increment it can't be DEFAULT 0.
PB
- Original Message -
From: Marvin Cummings
To: [EMAIL PROTECTED]
Sent: Sunday, May 09, 2004 7:26 PM
Subject: Error creating table in MySQL 5.0
Wondering if anyone can give me some help with this error I'm getting
wh