What error do you get? Anyway, check/fix following:
- The column 'group_role' referenced in the PRIMARY KEY doesn't exist in the created table.
- Make sure that the 'groups' table exist and it has primary or candidate index on groups_id.
- Remove ';' semicolon from the CREATE TABLE statement.
>I failed to create foreign key in the following SQL statement.
>
>CREATE TABLE groups_role
>(
> groups_id varchar(5) NOT NULL,
> gr_role varchar(10) NOT NULL,
> gr_add bit DEFAULT(0) NOT NULL,
> gr_edit bit DEFAULT(0) NOT NULL,
> gr_delete bit DEFAULT(0) NOT NULL,
> gr_read bit DEFAULT(0) NOT NULL,
> PRIMARY KEY (groups_id, group_role),
> FOREIGN KEY (groups_id) REFERENCES groups(groups_id)
>);
--sb--