"Gabriel PREDA" <[EMAIL PROTECTED]> wrote on 03/16/2005 06:12:14 AM:
> > It looks from googling as though I need to drop all foreign key
> constraints on this column, perform the change and then reestablish the
> foreign keys. Could anyone confirm or advise of a better solution?
>
> That is the w
> It looks from googling as though I need to drop all foreign key
constraints on this column, perform the change and then reestablish the
foreign keys. Could anyone confirm or advise of a better solution?
That is the way ! :)
You need to drop the constrains...
Alter `reference` and make `id` INT
Hi,
I have a column 'id' within a table :
CREATE TABLE `reference` (
*`*id*`* smallint(5) unsigned NOT NULL auto_increment,
`study_name` text,
`author` text NOT NULL,
`date` date NOT NULL default '-00-00',
`reference` varchar(250) NOT NULL default '',
`title` varchar(250) NOT NULL default
Hello,
Are there any plans to implement foreign keys with deferred integrity
constraint checking in the InnoDB storage engine in a future release of
the MySQL Server?
Many thanks,
- glenn
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://list
t; <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Monday, June 10, 2002 10:57 AM
Subject: InnoDB foreign key constraints
>
> Hello list!
>
> I'm having a bit of trouble getting foreign key constraints to work.
> I'm running MySQL 2.23.50-Max.
>
>
on't
agree to these terms, you should return this email in no more than 24 hours
stating the reason of disagreement.
-Oorspronkelijk bericht-----
Van: Markus Lervik [mailto:[EMAIL PROTECTED]]
Verzonden: maandag 10 juni 2002 10:45
Aan: Kiss Dániel
CC: [EMAIL PROTECTED]
Onderwerp: Re: Inno
On Monday 10 Jun 2002 11:44 am, Markus Lervik wrote:
> mysql> show create table ip_name_tbl\G
> *** 1. row ***
>Table: ip_name_tbl
> Create Table: CREATE TABLE `ip_name_tbl` (
[snip]
> `name_id` int(11) NOT NULL default '0',
[snip]
> mysq
On Monday 10 Jun 2002 11:17 am, you wrote:
> First of all the referenced key must be on PRIMARY KEY.
...which means my 'id' -field can't be a primary key, right?
> But I've seen in your table definition a quite strange thing. You have a
> UNIQUE and an ORDINARY key definition on the same field.
Heya!
You need an INDEX.
Try doing this first :
alter table ip_name_tbl add INDEX(name_id);
And add then your constraint.
EG
mysql> SHOW CREATE TABLE ip_name_tbl\G
*** 1. row ***
Table: ip_name_tbl
Create Table: CREATE TABLE `ip_name_tbl
First of all the referenced key must be on PRIMARY KEY.
But I've seen in your table definition a quite strange thing. You have a
UNIQUE and an ORDINARY key definition on the same field.
Here:
...
> UNIQUE KEY `name_id` (`name_id`), <- THIS IS THE FIRST DEFINITION
> UNIQUE KEY `comp_name` (`
Hello list!
I'm having a bit of trouble getting foreign key constraints to work.
I'm running MySQL 2.23.50-Max.
Here's what I got:
mysql> SHOW CREATE TABLE conn\G
*** 1. row ***
Table: conn
Create Table: CREATE TABLE `conn` (
`id` int(10
Daniel,
- Original Message -
From: "Daniel Rand" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.mysql
Sent: Monday, May 13, 2002 5:24 PM
Subject: InnoDB Foreign Key Constraints
> Hi,
>
> Does anyone know if it's possible to set up a foreign key constrain
12 matches
Mail list logo