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
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
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
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
-
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
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.
* 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
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.
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.
-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
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.
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
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
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,
]
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
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,
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
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
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
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
(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,
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
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
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
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
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
: 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
27 matches
Mail list logo