Creating primary and foreign keys for MySQL

2004-10-13 Thread Herman Scheepers
Hi All I am MySQL newby with an Oracle background. Is the following syntax suported? alter table members add primary key (id); alter table members add constraint members_uk unique (name); Thanx Herman __ Do you Yahoo!? Yahoo! Mail Address

Re: Creating primary and foreign keys for MySQL

2004-10-13 Thread SGreen
You haven't found the online manual yet, have you? http://dev.mysql.com/doc/mysql/en/index.html Specifically the documentation for the command you are curious about is found here: http://dev.mysql.com/doc/mysql/en/ALTER_TABLE.html Shawn Green Database Administrator Unimin Corporation - Spruce

Foreign keys in MySQL 5.0

2003-09-04 Thread Chris Nolan
Hi all! Looking at one of the things that is set to be added to MySQL 5.0 (foreign keys for all table types), I have the following question: Will we be able to have foreign keys that involve tables of different types? Any early indications about the performance implications of having such things

Primary and Foreign Keys in MySQL

2002-07-24 Thread Aamer Rauf
Hello, I am working on MySQL database. I have come across a 'problem' but don't know how to get around that. The problem is the following: I have a table, say TABLE1, with primary key being called as table1_id. Now there are other tables, like TABLE1A, TABLE1B, TABLE1C etc.. where I want to

RE: Primary and Foreign Keys in MySQL

2002-07-24 Thread Jon Frisby
- From: Aamer Rauf [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 24, 2002 12:55 PM To: [EMAIL PROTECTED] Subject: Primary and Foreign Keys in MySQL Hello, I am working on MySQL database. I have come across a 'problem' but don't know how to get around that. The problem

Foreign keys in MySQL

2002-07-10 Thread Hanxue Lee
Hi, In the MySQL documentation, it is stated that foreign keys in SQL are not used to join tables, but are used mostly for checking referential integrity (foreign key constraints). Does it mean that constraints are not supported? I need to have Update and perhaps Delete Referential Integrity.

Re: Foreign keys in MySQL

2002-07-10 Thread Roger Baklund
* Hanxue Lee In the MySQL documentation, it is stated that foreign keys in SQL are not used to join tables, but are used mostly for checking referential integrity (foreign key constraints). This could have been formulated in a better way, IMHO. I would even say the statement is wrong. In

foreign keys in MySQL-Max-4.0.1

2002-06-07 Thread victoria papazoi
Hi, I use MySQL-Max-4.0.1 and i am wantering if is true that the information about the foreign keys are stored at comment properties of table with maximum length 60 characters? I need to use innodb tables with many f.keys.What I have to do? Thank you.

foreign keys in MySQL-Max-4.0.1

2002-06-07 Thread victoria papazoi
Hi, I use MySQL-Max-4.0.1 and i am wantering if the information about the foreign keys are stored at comment properties of table with maximum length 60 characters? I need to use innodb tables with many f.keys.What I have to do? Thank you.

FW: foreign keys in MySQL-Max-4.0.1

2002-06-07 Thread victoria papazoi
-Original Message- From: victoria papazoi [mailto:[EMAIL PROTECTED]] Sent: Friday, June 07, 2002 11:58 AM To: [EMAIL PROTECTED] Subject: foreign keys in MySQL-Max-4.0.1 Hi, I use MySQL-Max-4.0.1 and i am wantering if the information about the foreign keys are stored at comment

Help - foreign keys in MySQL-Max-4.0.1

2002-06-07 Thread victoria papazoi
Hi, I use MySQL-Max-4.0.1 and i am wantering if the information about the foreign keys are stored at comment properties of table with maximum length 60 characters? I need to use innodb tables with many f.keys.What I have to do? Thank you.

Foreign Keys with MySQL 3.23.49 and 3.23.50

2002-05-28 Thread Jostkleigrewe, Heiner
sql,query Hello, i've tried the foreign key-example out of the documentation(3.5.6 Using Foreign Keys) on W2K (3.23.49 + 3.23.50) and LINUX (3.23.49). The tables persons and shirts are created as innodb-tables. I could insert a shirt for a non-existing person. Also i could delete a

Re: Foreign Keys with MySQL 3.23.49 and 3.23.50

2002-05-28 Thread René Moonen
Hi Nothing is wrong! The behaviour of your example is correct, because MySQL does not support the concept of foreign keys. See section 1.4.4.5 of the MySQL manual. In other words data integrity between two tables is not ensured by MySQL. Your application code must solve this. Regards Rene

Re: Foreign Keys with MySQL 3.23.49 and 3.23.50

2002-05-28 Thread Christopher Book
This example is in InnoDB though, which should support foreign key constraints. Chris Book In other words data integrity between two tables is not ensured by MySQL. Your application code must solve this. - Before posting,

AW: Foreign Keys with MySQL 3.23.49 and 3.23.50

2002-05-28 Thread Jostkleigrewe, Heiner
] Betreff: Re: Foreign Keys with MySQL 3.23.49 and 3.23.50 In article [EMAIL PROTECTED], Jostkleigrewe, Heiner [EMAIL PROTECTED] writes: sql,query Hello, i've tried the foreign key-example out of the documentation(3.5.6 Using Foreign Keys) on W2K (3.23.49 + 3.23.50) and LINUX

Re: foreign keys in mysql

2002-03-06 Thread Arjen Lentz
Hi, On Thu, 2002-03-07 at 08:20, bin cai wrote: 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,

Re: InnoDB foreign keys crash MySQL

2002-02-12 Thread Heikki Tuuri
Harald, I tested the below with 3.23.48, and it worked ok. Could it be that you have not used DROP TABLE or DROP DATABASE to remove InnoDB tables? Then the internal data dictionary may be out-of-sync from the .frm files of your tables. Please use innodb_table_monitor (section 9.1 in

Re: InnoDB foreign keys crash MySQL

2002-02-12 Thread Harald Fuchs
In article 003b01c1b0a4$351665f0$540ec5c2@omnibook, Heikki Tuuri [EMAIL PROTECTED] writes: Harald, I tested the below with 3.23.48, and it worked ok. Could it be that you have not used DROP TABLE or DROP DATABASE to remove InnoDB tables? Then the internal data dictionary may be out-of-sync

Re: InnoDB foreign keys crash MySQL

2002-02-12 Thread Heikki Tuuri
TABLE MONITOR OUTPUT == -Original Message- From: Harald Fuchs [EMAIL PROTECTED] To: Heikki Tuuri [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, February 08, 2002 3:50 PM Subject: Re: InnoDB foreign keys crash MySQL In article

Re: InnoDB foreign keys crash MySQL

2002-02-12 Thread Heikki Tuuri
09, 2002 3:59 PM Subject: Re: InnoDB foreign keys crash MySQL Harald, Hi, Heikki! ... I tested now with the official Linux binary of 4.0.1 (not -max) and it worked ok on our dual Xeon Linux-2.4.16-SMP-64GB. I did not define any InnoDB startup options in my.cnf. I just downloaded mysql

InnoDB foreign keys crash MySQL

2002-02-11 Thread Harald Fuchs
(MySQL 4.0.1-alpha-Max-log, your Linux binary) The following works fine (just a slight variation of what is in the manual): 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,

Re: InnoDB foreign keys crash MySQL

2002-02-09 Thread Heikki Tuuri
09, 2002 3:59 PM Subject: Re: InnoDB foreign keys crash MySQL Harald, Hi, Heikki! ... I tested now with the official Linux binary of 4.0.1 (not -max) and it worked ok on our dual Xeon Linux-2.4.16-SMP-64GB. I did not define any InnoDB startup options in my.cnf. I just downloaded mysql

Re: InnoDB foreign keys crash MySQL

2002-02-08 Thread Heikki Tuuri
Harald, I tested the below with 3.23.48, and it worked ok. Could it be that you have not used DROP TABLE or DROP DATABASE to remove InnoDB tables? Then the internal data dictionary may be out-of-sync from the .frm files of your tables. Please use innodb_table_monitor (section 9.1 in

Re: InnoDB foreign keys crash MySQL

2002-02-08 Thread Heikki Tuuri
TABLE MONITOR OUTPUT == -Original Message- From: Harald Fuchs [EMAIL PROTECTED] To: Heikki Tuuri [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] [EMAIL PROTECTED] Date: Friday, February 08, 2002 3:50 PM Subject: Re: InnoDB foreign keys crash MySQL In article

Making Foreign Keys within MySQL?

2001-10-26 Thread McGrotty, Charles
I realized I made my previous post look like it was a reply and not the original question, so here I go again...=o) Original message below = Hello, I have tables in a user administration database and need

Re: Making Foreign Keys within MySQL?

2001-10-26 Thread Tore Van Grembergen
at www.innodb.com) For the moment it is nog possible to do it with an alter table after the table is created. - Original Message - From: McGrotty, Charles [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, October 26, 2001 3:10 PM Subject: Making Foreign Keys within MySQL? I realized I

Re: Making Foreign Keys within MySQL?

2001-10-26 Thread Tore Van Grembergen
: Making Foreign Keys within MySQL? my tables are currently MyISAM, is it possible to do a dump (inc data) and recreate the tables with the following? DROP TABLE IF EXISTS table name; CREATE TABLE table name ( field names ) TYPE=innodb; INSERT INTO table name VALUES ( values ); regards