Looking at the docs:
http://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html
how do I alter the child table, links, so that it has a foreign key with
the parent table, feeds?
The feed_id field in links should, in fact, be constrained by the foreign
key of feeds with a RESTRICT
Productions
http://www.upscene.com
Download Database Workbench for Oracle, MS SQL Server, Sybase SQL
Anywhere, MySQL, InterBase, NexusDB and Firebird!
-Original Message-
From: thufir
Sent: Monday, November 17, 2014 10:42 AM
To: mysql@lists.mysql.com
Subject: alter table for foreign key
On 14-11-17 01:42 AM, thufir wrote:
Looking at the docs:
http://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html
how do I alter the child table, links, so that it has a foreign key with
the parent table, feeds?
The workbench GUI came up with:
ALTER TABLE
On 14-11-17 01:42 AM, thufir wrote:
Looking at the docs:
http://dev.mysql.com/doc/refman/5.6/en/create-table-foreign-keys.html
how do I alter the child table, links, so that it has a foreign key with
the parent table, feeds?
The workbench GUI came up with:
ALTER TABLE
On Mon, 17 Nov 2014 10:59:15 +0100, Martijn Tonies (Upscene Productions)
wrote:
In general, an index is used for performance, while a constraint is
used for logical concepts, like uniqueness. Most often, the DBMS uses an
index to implement these logical concepts, but it's better to understand
Chuck,
- Original Message -
From: Chuck Simmons [EMAIL PROTECTED]
Newsgroups: mailing.database.mysql
Sent: Tuesday, July 09, 2002 4:29 AM
Subject: possible bug: alter table trashed foreign key constraints in innodb
sql query
In version 3.23.49a when using an innodb table, alter
Chuck,
Tuesday, July 09, 2002, 4:26:31 AM, you wrote:
CS In version 3.23.49a when using an innodb table, alter table appears to
CS corrupt foreign key constraints. Try the following test case:
It's described in the MySQL manual:
http://www.mysql.com/doc/S/E/SEC446.html
and fixed since
sql query
In version 3.23.49a when using an innodb table, alter table appears to
corrupt foreign key constraints. Try the following test case:
create table test_base (
base_id int not null,
primary key (base_id)
) type = innodb;
create table test_ref (
base_id int