INNODB still not working Re: Does mysql support foreign key on delete cascade and on update cascade?

2002-12-11 Thread Jing Dai
key, - vendorName VARCHAR(30) NOT NULL, - featureName VARCHAR(30) NOT NULL, - comment VARCHAR(100)) TYPE=INNODB; mysql create table samDB.license_data( - licenseID integer(5), index licID_index (licenseID), foreign key licID_index (licenseID) REFERENCES samDB.license_info

Does mysql support foreign key on delete cascade and on update cascade?

2002-12-10 Thread Jing Dai
I am just working on mySQL and create two tables, defined licenseID is the primary key in license_info, and foreign key in license_data. But I tested it didn't work the way as like in Oracle delete cascade or update cascade. Did I do something incorrect? mysql create table samDB.license_info

Re: Does mysql support foreign key on delete cascade and on update cascade?

2002-12-10 Thread Benjamin Pflugmann
Hello. On Tue 2002-12-10 at 16:05:05 -0800, [EMAIL PROTECTED] wrote: I am just working on mySQL and create two tables, defined licenseID is the primary key in license_info, and foreign key in license_data. But I tested it didn't work the way as like in Oracle delete cascade or update cascade

Re[2]: Creating foreign key

2002-11-19 Thread Dyego Souza do Carmo
vvM HI vvM still not working :-( vvM I didn't do the installation , Do we need to set any option vvM specifically during the installation for foreign key to work?? The InnoDB is loaded ? please run show variables like '%innodb%'; and put here. tnks. sql,query

re: Re: Creating foreign key

2002-11-19 Thread Victoria Reznichenko
vinita, Tuesday, November 19, 2002, 2:06:01 AM, you wrote: vvM still not working :-( vvM I didn't do the installation , Do we need to set any option vvM specifically during the installation for foreign key to work?? Check that your both tables are InnoDB: SHOW TABLE STATUS LIKE

Re: Creating foreign key

2002-11-19 Thread vinita vigine Murugiah
:-( vvM I didn't do the installation , Do we need to set any option vvM specifically during the installation for foreign key to work?? The InnoDB is loaded ? please run show variables like '%innodb%'; and put here. tnks. sql,query

Creating foreign key

2002-11-18 Thread vinita vigine Murugiah
HI I'm not sure what I'm doing wrong in the following example, the foreign key is NOT working. I'm using ver3.23.53. - mysql CREATE TABLE unit ( - unitCode CHAR(20) NOT NULL

Re: Creating foreign key

2002-11-18 Thread Silmara
Change room to unit FOREIGN KEY (unitCode) REFERENCES room (unitCode) ON DELETE CASCADE FOREIGN KEY (unitCode) REFERENCES unit(unitCode) ON DELETE CASCADE Hope this helps, Sil - Original Message - From: vinita vigine Murugiah [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November

Re: Creating foreign key

2002-11-18 Thread vinita vigine Murugiah
HI still not working :-( I didn't do the installation , Do we need to set any option specifically during the installation for foreign key to work?? mysql CREATE TABLE unit ( - unitCode CHAR(20) NOT NULL, - unitName CHAR(50), - unitYear CHAR(20) NOT NULL, - PRIMARY KEY (unitCode

InnoDB, Foreign Key

2002-10-29 Thread Serdioukov Edouard
Hello I use Linux Red Hat 7.3 and MySQL-max version 2.23.51. I have one problem. I created table: CREATE TABLE Folders ( FOLDER_ID INTEGER NOT NULL, FOLDER_NAME VARCHAR(50) NOT NULL, PARENT INTEGER NULL, PRIMARY KEY (FOLDER_ID), KEY XIE1_Folders (PARENT), FOREIGN KEY

Re: InnoDB, Foreign Key

2002-10-29 Thread Peter Brawley
Edouard, you have a foreign key referencing a column in its own table. PB - - Original Message - From: Serdioukov Edouard [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 3:23 AM Subject: InnoDB, Foreign Key Hello I use Linux Red Hat 7.3 and MySQL-max

Re: InnoDB, Foreign Key

2002-10-29 Thread Heikki Tuuri
From: Heikki Tuuri To: Serdioukov Edouard Cc: [EMAIL PROTECTED] Sent: Tuesday, October 29, 2002 7:23 PM Subject: Re: InnoDB, Foreign Key Edouard, I tested this on Linux using mysql-max-3.23.51, the .tar.gz distro. It worked ok. Are you sure you were using 3.23.51? Starting from 3.23.50, InnoDB

Re: Database in path to foreign key references

2002-10-25 Thread Heikki Tuuri
Christian, - Original Message - From: Christian Lizell [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Thursday, October 24, 2002 6:18 PM Subject: Database in path to foreign key references Hello! Is there any way to get rid of the database name in the path

Database in path to foreign key references

2002-10-24 Thread Christian Lizell
Hello! Is there any way to get rid of the database name in the path to the reference of a foreign key. When using mysqldump to copy a database the name of the source database is in the path of the foreign key reference. In my case, that is not what I want. An example: mysql use

Re: foreign key

2002-10-22 Thread Heikki Tuuri
Massimo, - Original Message - From: Massimo Petrini [EMAIL PROTECTED] To: Heikki Tuuri [EMAIL PROTECTED] Sent: Tuesday, October 22, 2002 8:32 AM Subject: foreign key There is a way to verify the foreign key ? If I put in my dump then instruction SET FOREIGN_KEY_CHECKS=0; I can

Re: Problem on ALTER TABLE ... ADD CONSTRAINT FOREIGN KEY..

2002-09-29 Thread Heikki Tuuri
Jungsu, - Original Message - From: Heo, Jungsu [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Saturday, September 28, 2002 9:34 AM Subject: Problem on ALTER TABLE ... ADD CONSTRAINT FOREIGN KEY.. Hello. I have a problem on ALTER TABLE ... ADD FOREIGN KEY. I'm using

Re:Re: Problem on ALTER TABLE ... ADD CONSTRAINT FOREIGN KEY..

2002-09-29 Thread Heo, Jungsu
Hello, Heikki. Thank you very much for your reply!. I Found the problem. If I give FK name explicitly, ALTER TABLE FOREIGN KEY .. dose not works. Example 1 - give FK name explictly # mysql alter table CONS_CHILD ADD constraint foreign key CONS_CHILD_FK

Problem on ALTER TABLE ... ADD CONSTRAINT FOREIGN KEY..

2002-09-28 Thread Heo, Jungsu
Hello. I have a problem on ALTER TABLE ... ADD FOREIGN KEY. I'm using InnoDBs, and I wanna create Foreign Key after table has been created. But, 'ALTER TABLE .. ADD FOREIGN KEY does not work. Manual says : The FOREIGN KEY, CHECK, and REFERENCES clauses don't actually do anything And in my

Question again(Problem on ALTER TABLE .. ADD CONSTRAINT FOREIGN KEY...

2002-09-28 Thread Heo, Jungsu
Sorry, I missed PARENT's COLUMNs. Corrects. ALTER TABLE CONS_CHILD ADD FOREIGN KEY CONS_CHILD_FK ( A , B ) REFERENCES CONS_PARENT(A, B ) on delete cascade ; Query OK, 0 rows affected (0.02 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql SHOW

foreign key support??

2002-09-27 Thread Remco Barendse
Hi! According to the website MySQL 4.0.x supports foreign key constraints. For version 4.1 foreign key integrity rules are planned. What is the difference between these 2? On previous versions of MySQL it was possible to create foreign keys but changed data was not replicated to other tables

re: foreign key support??

2002-09-27 Thread Egor Egorov
Remco, Friday, September 27, 2002, 6:29:28 PM, you wrote: RB According to the website MySQL 4.0.x supports foreign key constraints. RB For version 4.1 foreign key integrity rules are planned. RB What is the difference between these 2? On previous versions of MySQL it RB was possible to create

Re: foreign key support??

2002-09-27 Thread Paul DuBois
At 17:29 +0200 9/27/02, Remco Barendse wrote: Hi! According to the website MySQL 4.0.x supports foreign key constraints. For version 4.1 foreign key integrity rules are planned. What is the difference between these 2? On previous versions of MySQL it was possible to create foreign keys

Re: foreign key support??

2002-09-27 Thread Scott Pippin
It is supported in MySQL 4.0.x if you use the InnoDb table handler. I'm not sure about 4.1. Remco Barendse [EMAIL PROTECTED] 09/27/02 09:29AM Hi! According to the website MySQL 4.0.x supports foreign key constraints. For version 4.1 foreign key integrity rules are planned. What

Re: primary/foreign key contraints

2002-09-03 Thread Victoria Reznichenko
neal, Tuesday, September 03, 2002, 4:06:37 AM, you wrote: n Sorry for the MySQL newbie question ... but are there not primary/foreign n key constraints in MySQL 3? I can't imagine that this is right. Perhaps n I'm just overlooking something Foreign keys constraints is supported in InnoDB

Re: primary/foreign key contraints

2002-09-03 Thread David Lloyd
Neal, Sorry for the MySQL newbie question ... but are there not primary/foreign key constraints in MySQL 3? In MyISAM tables or ISAM tables no. I can't imagine that this is right. Perhaps I'm just overlooking something innodb? (mysql query) DSL

primary/foreign key contraints

2002-09-02 Thread neal
Sorry for the MySQL newbie question ... but are there not primary/foreign key constraints in MySQL 3? I can't imagine that this is right. Perhaps I'm just overlooking something Thanks. Neal - Before posting, please check

Re: how should I enter data into foreign key fields?

2002-08-19 Thread Egor Egorov
Kai, Sunday, August 18, 2002, 1:53:32 AM, you wrote: KV Just created a table with a column named client_nr that is a foreign key KV referencing to my Clients table: KV CREATE TABLE Contacts ( KV contact_nrint not null auto_increment, KV first_namechar(30), KV last_namechar(30), KV

how should I enter data into foreign key fields?

2002-08-17 Thread Kai Vermehr
Just created a table with a column named client_nr that is a foreign key referencing to my Clients table: CREATE TABLE Contacts ( contact_nrint not null auto_increment, first_namechar(30), last_namechar(30), client_nr char (30), emailchar(30), tel_1char(5), tel_2char(30

Foreign key definitions

2002-07-19 Thread Daniel Kiss
Hi, I just would like to ask that what are the following foreign key definition extensions good for exactly? I mean how does these SQL syntaxes work? MATCH FULL | MATCH PARTIAL ON DELETE/UPDATE RISTRICT/CASCADE/SET NULL/NO ACTION/SET DEFAULT Thx, Daniel

Foreign key bug in InnoDB?

2002-07-16 Thread Kiss Daniel
= InnoDB; CREATE TABLE AChildren ( Id int unsigned not null auto_increment, Parent int unsigned not null, primary key (Id), index Parent (Parent), foreign key (Parent) references AParents (Id) ) TYPE = InnoDB; //Section B CREATE TABLE BParents ( Id int unsigned not null

Re: Foreign key bug in InnoDB?

2002-07-16 Thread Heikki Tuuri
a non-latin1 character set as the default character set, then definition of foreign key constraints could fail in an assertion failure in dict0crea.c, reporting an internal error 17. ... Please upgrade to 4.0.2. Heikki Tuuri Innobase Oy --- InnoDB - transactions, hot backup, and foreign key support

Re: Foreign key bug in InnoDB?

2002-07-16 Thread Victoria Reznichenko
and they cannot be repaired (as I restart MySQL). KD The crash appears when I create the second table with a foreign key KD constraint. KD Do I do something wrong or this is a real bug in InnoDB? Do you use other than latin1 default character set? If so, this bug was fixed in 3.23.49: http

Re: Re: Foreign key bug in InnoDB?

2002-07-16 Thread Kiss Daniel
Heikki, Yes, I'm using Hungarian character-set as default. I've checked the mysql.err, and it contains nothing important. The full content of mysql.err right after starting mysqld-max, runnig the script and crash: --- MySql: ready for connections --- Maybe, because MySQL crashed before it

Re: More than one foreign key in a table

2002-07-13 Thread Heikki Tuuri
BKR, you can have any number of foreign keys in a single table. But you have not created the necessary indexes on foreign keys: ... Both tables have to be InnoDB type and there must be an index where the foreign key and the referenced key are listed as the first columns. InnoDB does not auto

Re: Re: More than one foreign key in a table

2002-07-13 Thread Egor Egorov
B.K.R., Saturday, July 13, 2002, 7:08:54 AM, you wrote: BKRS The below mentioned sql makes an error when created BKRS with two foreign key constraints under MySQL/Innodb BKRS table type. Any help to solve this problem? BKRS create table UserMenuRestrictions BKRS ( BKRS CompanyCode

Re: More than one foreign key in a table

2002-07-13 Thread Michael Ivanyo
You shouldn't have a problem if you list each foreign key separately, as follows: foreign key (MenuName) references MenuDetails (MenuName)on update restrict on delete restrict, foreign key (MenuParentName) references MenuDetails (MenuParentName)on update restrict on delete restrict, That's how

Re: More than one foreign key in a table

2002-07-12 Thread B.K.R. Shivaprakkash
Hi, The below mentioned sql makes an error when created with two foreign key constraints under MySQL/Innodb table type. Any help to solve this problem? create table UserMenuRestrictions ( CompanyCodechar(10) not null, UserId char(10

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

Re: Fwd: Re: Foreign key

2002-07-01 Thread Victoria Reznichenko
not null, EV foreign key (id_person) references person (id_person)); EV For example: EV I put a row in table PERSON with id_person = 1 EV If I try to put in table FRIENDS id_person = 7, I get...why? EV Should not give error? EV And the referential integrity? I guess your table is not InnoDB

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-27 Thread Heikki Tuuri
Hi! Since InnoDB implements foreign keys at a low level, it cannot presently instruct MySQL to change the table definition in the .frm file and create a new index. We can modify the MySQL parser though so that it will treat FOREIGN KEY (...) REFERENCES ... like it does an ordinary KEY

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-26 Thread Erv Young
oughtness, but I can tell you from frustrating personal experience that Oracle, like MySQL, does not auto-create indexes on foreign keys. But, unlike MySQL, Oracle does not require that the foreign key column be indexed. So there is no syntactical error in Oracle. Your code runs, but your queries

Re: remove foreign key constraint

2002-06-26 Thread Victoria Reznichenko
Pierre, Tuesday, June 25, 2002, 3:54:28 PM, you wrote: PB how to remove a foreign key constraint without recreating the innodb table ? No, it's not possible ... -- For technical support contracts, goto https://order.mysql.com/?ref=ensita This email is sponsored by Ensita.net http

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Heikki Tuuri
Hi! NOT NULL does not prevent the creation of a foreign key constraint. I think the problem was that Andy did not create an index explicitly on the foreign key (he created only on the referenced key). Regards, Heikki Innobase Oy - Original Message - From: Roger Baklund [EMAIL

remove foreign key constraint

2002-06-25 Thread Pierre Baridon
how to remove a foreign key constraint without recreating the innodb table ? thanks, Pierre sql,query - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com

Re: Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Andy Dustman
... ;) Ouch, you are correct, although they are the same *type*. However, this seems like a fairly severe restriction. Obviously a primary key must be NOT NULL, but there are certainly cases where a column which refers to a foreign key must be NULL. The docs do say that the foreign key constraints

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Roger Baklund
, ...does not look the same to me... ;) Ouch, you are correct, although they are the same *type*. However, this seems like a fairly severe restriction. Obviously a primary key must be NOT NULL, but there are certainly cases where a column which refers to a foreign key must be NULL. The docs do say

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-25 Thread Andy Dustman
it. In fact now I see this in the on-line docs: Both tables have to be InnoDB type and there must be an index where the foreign key and the referenced key are listed as the first columns. InnoDB does not auto-create indexes on foreign keys or referenced keys: you have to create them explicitly

Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-24 Thread andy
Description: In CREATE TABLE, column-spec REFERENCES does nothing, as described in the documentation. If FOREIGN KEY (x) REFERENCES othertable(y) is added to the table, as described in the documentation: http://www.mysql.com/doc/S/E/SEC446.html I always get an error like this: ERROR 1005

Re: Can't create FOREIGN KEY restraints on InnoDb tables

2002-06-24 Thread Roger Baklund
* [EMAIL PROTECTED] [...] The referred to keys are the same type and are indexed (they are [...] CREATE TABLE genres ( genre_idSMALLINT NOT NULL PRIMARY KEY, [...] genre_idSMALLINT, ...does not look the same to me... ;) -- Roger sql

Re: Foreign Key Worries

2002-06-21 Thread Benjamin Pflugmann
Hello. On Fri 2002-06-21 at 10:47:28 -0400, [EMAIL PROTECTED] wrote: On Thursday 20 June 2002 21:15, Benjamin Pflugmann wrote: IMHO, the interesting question is: how could the tables get out of sync, in a way that foreign keys would be able to prevent? I am not able to see a way in

Foreign Key Worries

2002-06-20 Thread Michael Ivanyo
Friends, I am designing a MySql DB schema that will use foreign keys similar to: create table orders(id int auto_increment primary key, amount double(7,2) ); create table orderItems(id int, item char(20), price double(5,2), quantity int, key(id), foreign key id references orders (id)); I am

Re: Foreign Key Worries

2002-06-20 Thread Benjamin Pflugmann
(5,2), quantity int, key(id), foreign key id references orders (id)); I am currently not using a version that supports foreign keys but hope to be in the future. In the meantime I'll need to implement the foreign key constraints through my application. My concern is that if either

InnoDB foreign key corruption

2002-06-19 Thread Okan CIMEN
. At the comment of the table, it used to store the foreign key relations but after the corruption it writes nonsense characters like #sql2-218-48... InnoDB free: 40960 kB; (MSISDN) REFER inoxpp/#sql2-218-48(MS Has anyone else faced this problem before? Regards Okan

Re: Re: More than one foreign key in a table

2002-06-18 Thread Egor Egorov
B.K.R., Tuesday, June 18, 2002, 5:52:07 AM, you wrote: BKRS Can I have more than one foreign key defined in a BKRS single table using MySQL/Innodb table type? Yes, it's possible. BKRS It gives an error in .frm file, if tried to have BKRS that? BKRS Any solution? Check your CREATE TABLE

Foreign Key Question

2002-06-14 Thread Michael Ivanyo
I am using MySql-3.23.51. Even though this version doesn't support foreign keys, the foreign key declarations can be entered without getting an error message. I would like to write CREATE TABLE statements that include foreign key declarations that would be compatible with future releases

Foreign key integrity pb ?

2002-06-12 Thread Christophe BRAM
I'm using MySQL Max 4.0.1 CREATE TABLE TableTwo ( Id int NOT NULL auto_increment, FK_TableOne int NOT NULL REFERENCES TableOne(Id), PRIMARY KEY (Id) ) TYPE=InnoDB; -- How can this work without having beforehand created the table TableOne ???

Re: Foreign key integrity pb ?

2002-06-12 Thread Tonu Samuel
On Wed, 12 Jun 2002, Christophe BRAM wrote: I'm using MySQL Max 4.0.1 CREATE TABLE TableTwo ( Id int NOT NULL auto_increment, FK_TableOne int NOT NULL REFERENCES TableOne(Id), PRIMARY KEY (Id) ) TYPE=InnoDB; -- How can this work without

RE: Foreign key integrity pb ?

2002-06-12 Thread Christophe BRAM
-Message d'origine- De : Tonu Samuel [mailto:[EMAIL PROTECTED]] Envoye : mercredi 12 juin 2002 10:51 A : Christophe BRAM Cc : [EMAIL PROTECTED] Objet : Re: Foreign key integrity pb ? On Wed, 12 Jun 2002, Christophe BRAM wrote: I'm using MySQL Max 4.0.1 CREATE TABLE

InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik
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

Re: InnoDB foreign key constraints

2002-06-10 Thread Kiss Dániel
` (`comp_name`), KEY `conn_idx` (`name_id`) - AND THIS IS THE SECOND ONE ... At 10:59 2002.06.10. +0300, you wrote: 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

Re: InnoDB foreign key constraints

2002-06-10 Thread Me
ip_name_tbl - ADD CONSTRAINT FOREIGN KEY (name_id) - REFERENCES conn(name_id) - ON DELETE CASCADE; ERROR 1005: Can't create table './koneet/#sql-355_4.frm' (errno: 150) I know error 1005 with an errno 150 means the foreign key would be incorrectly formed, but I can't just figure out

Re: InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik
) NOT NULL default '', `name_id` int(10) unsigned NOT NULL default '0', PRIMARY KEY (`name_id`), KEY `id` (`id`) ) TYPE=InnoDB and, again: mysql ALTER TABLE ip_name_tbl - ADD CONSTRAINT FOREIGN KEY (name_id) - REFERENCES conn (name_id) - ON DELETE CASCADE; ERROR 1005: Can't create

Re: InnoDB foreign key constraints

2002-06-10 Thread Markus Lervik
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] mysql show

RE: InnoDB foreign key constraints

2002-06-10 Thread Wouter van Vliet
What I think, is that your syntax for creating the primary key is slightly incorrect. I'm not sure if this is also true vor MySQL but I got teached at school that a foreign key can only point to the primary key of a table. Perhaps you can try to do the following: Create Table: CREATE TABLE `conn

Creating a Foreign Key

2002-05-30 Thread Arul
Hi All I am currently using 3.23.49 Max on Win 2K. I just saw from the docs that this version supports foreign key...So i just thought of working on it... I just created two tables parent and child CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE TABLE child(id INT

Discovering which foreign key constraint failed

2002-05-29 Thread Cesar Mello - Axi
Hello, I'm using InnoDB tables, is there a way to know which foreign key constraint was violated? Oracle gives me the constraint name in the error message, so that I can seek in the data dictionary. I'm porting an web application developed for Oracle to MySQL, so I need a solution

mulitple uses of a foreign key

2002-05-29 Thread Erik Price
I was hoping for some help with this -- I'm not sure if I can use just one SQL statement to pull this data out, I think I need to use two separate statements. Can someone clarify for me? My tables: +-+ +---+ | people | | projects | +-+

- Foreign key constraints

2002-05-28 Thread maxim
Hi all! Question. I try to understand with 4.3 Foreign key constraints InnoDB Engine in MySQL-Max-3.23.50/MySQL-4.0.1. I use MySQL Max (InnoDB) 3.23.49 for Win2000 I have created two tables: CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE

Re: - Foreign key constraints

2002-05-28 Thread Egor Egorov
maxim, Tuesday, May 28, 2002, 4:47:13 PM, you wrote: m Question. I try to understand with 4.3 Foreign key constraints m InnoDB Engine in MySQL-Max-3.23.50/MySQL-4.0.1. m I use MySQL Max (InnoDB) 3.23.49 for Win2000 m I have created two tables: m CREATE TABLE parent (id INT NOT NULL, m

- HELP Foreign key constraints

2002-05-28 Thread maxim
Hi all! Question. I try to understand with 4.3 Foreign key constraints InnoDB Engine in MySQL-Max-3.23.50/MySQL-4.0.1. I use MySQL Max (InnoDB) 3.23.49 for Win2000 I have created two tables: CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE

foreign key and check ICs: implementation suggestion

2002-05-27 Thread Neil Zanella
Hello, The documentation often mentions that foreign key support in mysql is not implemented because it slows down the database server. The argument is that since the applications built on top of mysql have to check for database integrity constraints (ICs) it is redundant for the database

Re: foreign key constraint to itself

2002-05-14 Thread Heikki Tuuri
Lisa, - Original Message - From: Lisa Tong [EMAIL PROTECTED] Newsgroups: mailing.database.mysql Sent: Tuesday, May 14, 2002 5:29 AM Subject: foreign key constraint to itself Hi, I am just wondering can I create foreign key constraint to itself in mySQL innodb (the mySQL 3.23.50

foreign key constraint to itself

2002-05-14 Thread Lisa Tong
Hi, I am just wondering can I create foreign key constraint to itself in mySQL innodb (the mySQL 3.23.50 release)? Let's say we have a table: test_table_01 (id integer, pid integer) type = innodb. Can I create a foreign key on pid and reference to test_table_01 (id)? Thanks, Lisa

Re: InnoDB Foreign Key Constraints

2002-05-13 Thread Heikki Tuuri
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 constraint where one table references

foreign key constraint to itself

2002-05-13 Thread Lisa Tong
Hi, I am just wondering can I create foreign key constraint to itself in mySQL innodb (the mySQL 3.23.50 release)? Let's say we have a table: test_table_01 (id integer, pid integer) type = innodb. Can I create a foreign key on pid and reference to test_table_01 (id)? Thanks, Lisa

foreign key ?

2002-05-02 Thread shimak
Hello ! How to use foreign key in mysql. I am using mysql 3.23.36 Thanx in advance Regards Shimak - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com

RE: foreign key ?

2002-05-02 Thread Roger Baklund
* shimak How to use foreign key in mysql. I am using mysql 3.23.36 Just do it... :) A foreign key is a field in a table referencing the primary key of another table. In mysql you don't need to specify which columns are foreign keys, you just use them in a join, and mysql will do the rest

Re: foreign key ?

2002-05-02 Thread Egor Egorov
shimak, Thursday, May 02, 2002, 11:22:38 AM, you wrote: s How to use foreign key in mysql. :) I think checking MySQL manual will be usefull for you: http://www.mysql.com/doc/S/E/SEC445.html http://www.mysql.com/doc/e/x/example-Foreign_keys.html http://www.mysql.com/doc

Re: foreign key / duplcation / optimization

2002-04-30 Thread David Hanney
At 08:29 29/04/02 -0700, Jeremy Zawodny wrote: On Mon, Apr 29, 2002 at 01:06:02PM +0100, David Hanney wrote: I've got a nice fat varchar(255) primary key who's content is duplicated (as a foreign key) in many other tables. I hope MySQL optimizes away that duplication internally

Re: foreign key / duplcation / optimization

2002-04-29 Thread Jeremy Zawodny
On Mon, Apr 29, 2002 at 01:06:02PM +0100, David Hanney wrote: I've got a nice fat varchar(255) primary key who's content is duplicated (as a foreign key) in many other tables. I hope MySQL optimizes away that duplication internally. Not as much as you're probably hoping for. Consider

foreign key on update cascade in mysql doesn't work

2002-04-17 Thread bin cai
Hello, I create innoDB tables database in mysql3.23.49. i create foreign key constraints(On UPdate cascade) in one table. but it seems doesn't work. the system just refused to update. I am wondering the innodb in mysql doesn't support the feature like on update cascade or on delete cascade

Re: foreign key on update cascade in mysql doesn't work

2002-04-17 Thread Heikki Tuuri
Hi! The brand-new source prerelease 3.23.50b-pre which you can download from http://www.innodb.com supports ON DELETE CASCADE and ON DELETE SET NULL. But does not support ON UPDATE CASCADE. Typically a foreign key refers to the primary key of another table, and it is not that common a primary

Re: FOREIGN KEY Constraints

2002-04-08 Thread Victoria Reznichenko
Carl, Monday, April 08, 2002, 3:16:26 AM, you wrote: CS From the mysql docs, it looks like you can only use foreign keys if your CS tables are type InnoDB. Is this correct? Yes, you are right. In MyISAM tables you can use REFERENCE clause, but it does nothing. CS Carl -- For

RE: FOREIGN KEY Constraints

2002-04-08 Thread Juan Maunel
Hi, Yes, you are right but be aware with the delete cascade feature, maybe in the way?. Regards - Original Message - From: Carl Schmidt [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, April 07, 2002 7:16 PM Subject: FOREIGN KEY Constraints From the mysql docs, it looks like you

FOREIGN KEY Constraints

2002-04-07 Thread Carl Schmidt
From the mysql docs, it looks like you can only use foreign keys if your tables are type InnoDB. Is this correct? Carl - Before posting, please check: http://www.mysql.com/manual.php (the manual)

Reg Foreign Key

2002-03-07 Thread Sanjay Chigurupati
Hi, Should I or shouldn't I explicitly specify the foreign key in Mysql? If I am not mistaken, Mysql handles foreign keys automatically at query time and we need not explicitly specify the foreign key. But, will the database detect error when I enter non-existent value for a foreign key? Do I

ALTER TABLE Foreign key problems

2002-03-06 Thread IvanLatysh
Hi. I am using MySQL 3.23.44-max and InnoDB tables. I also using foreign key in my tables. I have problem, I couldn't alter my table and add any foreign keys. SQL like this: alter table data_entry add FOREIGN KEY (data_task_id) REFERENCES data_task(identity); give me any error but key doesn't

foreign key doesn't work

2002-03-06 Thread bin cai
Hello, I am encountering one problem. I am using mysql as the dabase for my application. I create a table like takeexam as following:create table takelabexam( sid varchar(10) not null, cid varchar(20) not null, marks integer foreign

foreign key doesn't work with mysql

2002-03-06 Thread bin cai
Hello, I am encountering one problem. I am using mysql as the dabase for my application. I create a table like takeexam as following:create table takelabexam( sid varchar(10) not null, cid varchar(20) not null, marks integer foreign

foreign key doesn't work with mysql

2002-03-06 Thread bin cai
foreign key (cid) references course on Update cascade , primary key (sid, cid,labsection,year)); cid in takelabexam references cid in table courses. so if i update the cid in courses table. the records in table takelabexam which references to courses should be updated automatically

foreign key problem

2002-03-04 Thread Asit Satpathy
hello i creates two table t1 and t2; CREATE TABLE t1 ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, PRIMARY KEY (id) ) TYPE=InnoDB; CREATE TABLE t2 ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, t1id INT UNSIGNED NOT NULL, PRIMARY KEY (id), KEY (t1id), FOREIGN KEY

If Foreign Key supports mean...

2002-02-17 Thread perumal
Hi, I want to correct myself about Mysql-Max . I installed mysql-max and worked with java application works perfectly and could create InnoDB tables with Foreign Key references, but I need to know about is it installed perfectly and supports transaction or any other settings have

Do MySQL are going to support NULL value for foreign key fields (in case parent are not null)

2002-02-13 Thread IvanLatysh
Hi All. Do MySQL are going to support NULL value for foreign key fields (in case parent are not null) I didn't found any mentions about this problem in news or somewhere else. If you have any kind of info please answer. Because so hard to use foreign keys without this option. Sincerely yours

foreign key syntax parsing errors

2002-01-30 Thread Joseph Drozdik
Below I have two queries. They both should do the same thing but the foreign key syntax is a little different. The first query fails, though some queries with foreign key clauses work sometimes, and the second one just works. Am I right in thinking the syntax for both these queries mean the same

Re: Double foreign key references?

2002-01-28 Thread Philip Molter
fine. Reference different tables : and it's fine. : : mysql-3.23.47 InnoDB tables under Sparc Solaris 8 : : : : mysql create table test_base ( fld int not null ); : Query OK, 0 rows affected (0.07 sec) : : mysql create table test_fk ( fld1 int not null, fld2 int not null, foreign key :(fld1

Re: Double foreign key references?

2002-01-28 Thread Heikki Tuuri
not null, foreign key (fld1) references test_base(fld), foreign key (fld2 references test_base(fld) ); : ERROR 1064: You have an error in your SQL syntax near 'references test_base(fld) )' at line 1 : mysql create table test_fk ( fld1 int not null, fld2 int not null, foreign key (fld1) references

Re: Double foreign key references?

2002-01-28 Thread Philip Molter
(fld) ); Query OK, 0 rows affected (0.00 sec) mysql create table test_fkey ( fld1 int not null, fld2 int not null, foreign key (fld1) references test_bk(fld), foreign key (fld2) references test_bk(fld)); ERROR 1005: Can't create table './test/test_fkey.frm' (errno: 150) mysql create table test_fkey

foreign key?

2002-01-25 Thread David S. Jackson
Name = Somebody Lastname; The values haven't been updated. They remain 0 and 0. What gives? Is this a foreign key problem? TIA. PS. Oh yeah, I'm using mysql 3.22 on debian 2.2. -- David S. Jackson[EMAIL PROTECTED

<    1   2   3   4   5   6   7   >