alter table for foreign key

2014-11-17 Thread thufir
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

Re: alter table for foreign key

2014-11-17 Thread Martijn Tonies (Upscene Productions)
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

Re: alter table for foreign key

2014-11-17 Thread thufir
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

Re: alter table for foreign key

2014-11-17 Thread Martijn Tonies (Upscene Productions)
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

Re: alter table for foreign key

2014-11-17 Thread thufir
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

Re: possible bug: alter table trashed foreign key constraints in innodb

2002-07-09 Thread Heikki Tuuri
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

Re: possible bug: alter table trashed foreign key constraints in innodb

2002-07-09 Thread Victoria Reznichenko
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

possible bug: alter table trashed foreign key constraints in innodbtables

2002-07-08 Thread Chuck Simmons
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