Re: Can not add foreign key constraints

2017-04-24 Thread Peter Brawley
On 4/24/2017 9:18, David Mehler wrote: Hello, I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL auto_inc

Re: Can not add foreign key constraints

2017-04-24 Thread Reindl Harald
Am 24.04.2017 um 16:18 schrieb David Mehler: I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL auto_inc

Can not add foreign key constraints

2017-04-24 Thread David Mehler
Hello, I'm trying to add a table to an existing database. I'm wanting it to get one of it's fields from an already existing table. I've done this before in this database. This works: CREATE TABLE `virtual_users` ( `id` int(11) NOT NULL auto_increment, `domain_id` int(11) NOT NULL, `u

RE: MySQL ignores foreign key constraints

2011-05-20 Thread Mimi Cafe
HARSET=latin1 | +-+-- Thanks From: Suresh Kuna [mailto:sureshkumar...@gmail.com] Sent: 20 May 2011 12:15 To: Mimi Cafe Cc: mysql@lists.mysql.com Subject: Re: MySQL ignores foreign key constraints WHat are the table engine types ? On Fri, May 20, 2

Re: MySQL ignores foreign key constraints

2011-05-20 Thread Suresh Kuna
WHat are the table engine types ? On Fri, May 20, 2011 at 4:37 PM, Mimi Cafe wrote: > Hi > > An ideas why MySQL silently ignores any foreign key constraints I define > for > the following tables? > &g

Re: MySQL ignores foreign key constraints

2011-05-20 Thread Andrew Moore
Try show create table ... ; A On Fri, May 20, 2011 at 12:07 PM, Mimi Cafe wrote: > Hi > > An ideas why MySQL silently ignores any foreign key constraints I define > for > the following tables? > &g

MySQL ignores foreign key constraints

2011-05-20 Thread Mimi Cafe
Hi An ideas why MySQL silently ignores any foreign key constraints I define for the following tables? mysql> desc book; +--+---+--+-+-+- --+ | Field| Type | Null | Key | Default | Ex

Re: No Need to Create Constraints?

2010-06-11 Thread jayabharath
e table >> 'nxdb.#sql-a6_3b' (errno: 150) >> >> When I check the structure of User_Role in phpMyAdmin (couldn't see a way >> to do this in Workbench), this is what I'm seeing: >> >> ActionKeynameTypeUniquePackedField

Re: No Need to Create Constraints?

2010-06-10 Thread SHAWN L.GREEN
role_id0 A So, is there no need for me to actually add these constraints? For more details about the error 150 code, check the SHOW ENGINE INNODB STATUS report. -- Shawn Green MySQL Principle Technical Support Engineer Oracle USA, Inc. Office: Blountville, TN

No Need to Create Constraints?

2010-06-10 Thread Lola Lee Beno
a way to do this in Workbench), this is what I'm seeing: ActionKeynameTypeUniquePackedFieldCardinality CollationNullComment PRIMARYBTREEYesNouser_id0A role_id0 A So, is

InnoDB tables but no FK constraints

2008-05-21 Thread debussy007
` WRITE; INSERT INTO `members_orders_items` VALUES (137,750,'54.00',25,45); //<-- Here should be an error ? UNLOCK TABLES; Thank you for any kind help !! Matt. -- View this message in context: http://www.nabble.com/InnoDB-tables-but-no-FK-constraints-tp17364156p17364156.html Sent from the MySQL

Re: Falcon and Foreign Key Constraints

2007-09-20 Thread Martijn Tonies
> On Thu, Sep 20, 2007 at 11:20:19AM +0200, Martijn Tonies wrote: > > I thought that Falcon supported FKs, but in my test, it doesn't? > > > > Can someone confirm this? > > The Falcon storage engine does not currently support foreign keys. > (The underlying engine does have support for them, but

Re: Falcon and Foreign Key Constraints

2007-09-20 Thread Jim Winstead
On Thu, Sep 20, 2007 at 11:20:19AM +0200, Martijn Tonies wrote: > I thought that Falcon supported FKs, but in my test, it doesn't? > > Can someone confirm this? The Falcon storage engine does not currently support foreign keys. (The underlying engine does have support for them, but this functiona

Falcon and Foreign Key Constraints

2007-09-20 Thread Martijn Tonies
Hi, I thought that Falcon supported FKs, but in my test, it doesn't? Can someone confirm this? Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Datab

Re: Foreign key constraints - Known issues ?

2007-07-19 Thread Martijn Tonies
>I just wanted to know whether there are any known issues in defining and using Foreign key constraints in MySQL 4 and >MySQL 5. >To be specific, are there any issues on using ON DELETE CASCADE and ON UPDATE CASCADE? > >Would there be any performance issues when we define Foreign

Foreign key constraints - Known issues ?

2007-07-19 Thread Ratheesh K J
Hello All, I just wanted to know whether there are any known issues in defining and using Foreign key constraints in MySQL 4 and MySQL 5. To be specific, are there any issues on using ON DELETE CASCADE and ON UPDATE CASCADE? Would there be any performance issues when we define Foreign key

Re: Alter table - adding constraints?

2007-02-21 Thread Jay Pipes
see what's possibly failing. No, it's because you already have a constraint in your schema called fk_regions. Just change the constraint name to one that is unique for your schema... This is the reason I usually name myu constraints like: fk_fromtable_totable So this doesn't

Re: Alter table - adding constraints?

2007-02-20 Thread Chris White
Jay Paulson wrote: 2) both tables have data in them. This is most likely your issue then, depending on the table size, go through and make sure that anything in the referenced column matches the referencing column. You should also be able to use SHOW INNODB STATUS to see what's possibly f

Re: Alter table - adding constraints?

2007-02-20 Thread Jay Paulson
1) both tables are InnoDB. 2) both tables have data in them. 3) both table are the exact same data types. On 2/20/07 3:51 PM, "Chris White" <[EMAIL PROTECTED]> wrote: > Jay Paulson wrote: >> I really don¹t know what to do because I keep getting this error. Any >> ideas? >> >> SQL query: >> >>

Re: Alter table - adding constraints?

2007-02-20 Thread Chris White
Jay Paulson wrote: I really don¹t know what to do because I keep getting this error. Any ideas? SQL query: ALTER TABLE pl_reports ADD CONSTRAINT fk_region FOREIGN KEY ( region ) REFERENCES Region( id ) ON UPDATE CASCADE ON DELETE CASCADE MySQL said: Documentation #1005 - Can't create table '.

Alter table - adding constraints?

2007-02-20 Thread Jay Paulson
I really don¹t know what to do because I keep getting this error. Any ideas? SQL query: ALTER TABLE pl_reports ADD CONSTRAINT fk_region FOREIGN KEY ( region ) REFERENCES Region( id ) ON UPDATE CASCADE ON DELETE CASCADE MySQL said: Documentation #1005 - Can't create table './survey_localhost/#sq

RE: Copy some datasets including the foreign key constraints

2006-11-27 Thread Jerry Schwartz
I am not an expert in this, but it looks as though you are trying to define foreign keys on your "parent" table. I thought you had to define the parent table without foreign keys, and then define a child table with foreign key constraints. I'm also not sure if you are trying to r

AW: Copy some datasets including the foreign key constraints

2006-11-23 Thread Eidner, Fabian
rtz [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 22. November 2006 15:54 An: Eidner, Fabian; mysql@lists.mysql.com Betreff: RE: Copy some datasets including the foreign key constraints Do you know what your query looks like after variable substitution? That always helps me a lot. If you can'

RE: Copy some datasets including the foreign key constraints

2006-11-22 Thread Jerry Schwartz
7:46 AM > To: mysql@lists.mysql.com > Subject: Copy some datasets including the foreign key constraints > > Hello list, > I'm pretty new here. > > But i already got an problem. I'm working a while with mysql currently > i'm trying to duplicate some entries in my t

Copy some datasets including the foreign key constraints

2006-11-22 Thread Eidner, Fabian
Hello list, I'm pretty new here. But i already got an problem. I'm working a while with mysql currently i'm trying to duplicate some entries in my tables. The problem is, i'm using foreign key constraints between those tables and i also would like to duplicate the childs. So

Re: Avoiding multi-col indexes & increasing speed inspite of fully-enforced constraints on a fully-normalized db

2006-09-18 Thread Jay Pipes
ifferent types of transactions in different > tables will only decrease the index key length by 1 and there will > still be three-columns in the indexs and there will be "many" tables > with three-column indexes, do you guys think that splitting up the > tables like this will

Avoiding multi-col indexes & increasing speed inspite of fully-enforced constraints on a fully-normalized db

2006-09-18 Thread Asif Lodhi
l be three-columns in the indexs and there will be "many" tables with three-column indexes, do you guys think that splitting up the tables like this will increase performance? Lastly, my database is fully normalized and I have tried to enformce data-integrity at the database level with all

Re: How to turn off all constraints in a table?

2006-02-21 Thread SGreen
Once CHECK CONSTRAINTS are enabled, I am sure there will be a way to turn them off temporarily. Right now, you can create tables that have them but they are not enforced. To quote http://dev.mysql.com/doc/refman/5.0/en/create-table.html >>>>>>>> InnoDB tables support

Re: How to turn off all constraints in a table?

2006-02-21 Thread SGreen
//dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html > > (a SHOW CREATE TABLE will show you the constraints including foreign > keys -- copy those, so you can create them later. Then you can use > ALTER TABLE to drop the keys, change your columns, and then you can > u

Re: How to turn off all constraints in a table?

2006-02-20 Thread sheeri kritzer
Drop the keys and references, change it, and then re-create the keys and references. http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html (a SHOW CREATE TABLE will show you the constraints including foreign keys -- copy those, so you can create them later. Then you can use

How to turn off all constraints in a table?

2006-02-17 Thread Tomáš Vichta
Hello, I need to turn off all constraints in a table (especially primary and foreign keys) - because for example I need to exchange primary key values of two rows in a table. And because of primary key constraints I can do it directly. I would to turn off the constraint, rename value of PK1

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Gleb Paharenko
Hello. You can post a bug: http://dev.mysql.com/doc/refman/5.0/en/bug-reports.html Lola J. Lee Beno wrote: > Gleb Paharenko wrote: > >> Hello. >> >> The query which is works is: > > > > Thanks - just what I needed. Looks like I'll need to be extra careful > with sql scripts generated from

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Gleb Paharenko wrote: Hello. The query which is works is: Thanks - just what I needed. Looks like I'll need to be extra careful with sql scripts generated from Mysql Workbench, which is still alpha right now. -- Lola - mailto:[EMAIL PROTECTED] http://www.lolajl.net | Blog at http://www

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Gleb Paharenko
Hello. The query which is works is: CREATE TABLE `Films` ( `FilmID` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT, `MovieTitle` TEXT NULL ,`PitchText` TEXT NULL, `AmountBudgeted` DECIMAL(11, 0) NULL, `RatingID` INT(11) unsigned , `Summary` L

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Peter Brawley wrote: Lola, />And got this following error message: >ERROR 1072 (42000): Key column '(not null)' doesn't exist in table / Yes, it's telling you what;s wrong: to define a constraint on a key, the table def must first define the key. Looking over the script again, RatingID is b

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Peter Brawley
#x27;m trying to create foreign key constraints and keep getting an error message 1005 (I did look it up, but didn't see an obvious solution to fixing this for my database). The version I'm using is 5.0.17-max.  I used Mysql WorkBench to create the database schema and had it generat

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
Michael Stassen wrote: 1) I'm not sure what you are intending with "(`(not null)`)" in the middle of your foreign key definition, but that isn't valid mysql syntax. See the manual for the correct syntax . This is f

Re: Can't Create Foreign Key Constraints

2006-02-07 Thread Michael Stassen
Lola J. Lee Beno wrote: I'm trying to create foreign key constraints and keep getting an error message 1005 (I did look it up, but didn't see an obvious solution to fixing this for my database). The version I'm using is 5.0.17-max. I used Mysql WorkBench to create the data

Can't Create Foreign Key Constraints

2006-02-07 Thread Lola J. Lee Beno
I'm trying to create foreign key constraints and keep getting an error message 1005 (I did look it up, but didn't see an obvious solution to fixing this for my database). The version I'm using is 5.0.17-max. I used Mysql WorkBench to create the database schema and had it g

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-20 Thread Jochem van Dieten
On 20 Oct 2005 10:13:56 +0200, Harald Fuchs wrote: > Jochem van Dieten writes: >> >> Back in reality you don't enforce this using DDL. Apart from the fact >> that I wouldn't know a single database that implements ASSERTIONs >> according to the SQL standard, can you imagine having to run some >> SEL

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-20 Thread Harald Fuchs
In article <[EMAIL PROTECTED]>, Jochem van Dieten <[EMAIL PROTECTED]> writes: > Back in reality you don't enforce this using DDL. Apart from the fact > that I wouldn't know a single database that implements ASSERTIONs > according to the SQL standard, can you imagine having to run some > SELECT fk

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-20 Thread Martijn Tonies
Hello Jochem, > >> That doesn't help: check constraints are evaluated only on insert and > >> update, not on delete. That's why you need an assertion. > > > > Hmmm, would that be SQL standard? Or implementation specific? > > It is at the very lea

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-20 Thread Jochem van Dieten
On 10/20/05, Martijn Tonies wrote: >> >> That doesn't help: check constraints are evaluated only on insert and >> update, not on delete. That's why you need an assertion. > > Hmmm, would that be SQL standard? Or implementation specific? It is at the very

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Martijn Tonies
n a way this can be seen as checking the multiplicity of the > >>>> relation between the two tables. I know one way would be using > >>>> triggers, but I was wondering if there was a way of specifying this > >>>> when the table is constructed. > &g

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Ledina Hido
CHECK constraints, but MySQL doesn't support them. CHECK constraints won't work. If I have a parent table and need to maintain a multiplicity of 1 to 3 children in the child table, how is a CHECK going to stop somebody from deleting all rows in the child table? That depen

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Jochem van Dieten
ployees under his control. >>>> In a way this can be seen as checking the multiplicity of the >>>> relation between the two tables. I know one way would be using >>>> triggers, but I was wondering if there was a way of specifying this >>>> whe

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Martijn Tonies
able to use an > assertion depending on your exact needs. (Don't know if there is any > database that actually implements them per the standard.) > > > > The way to do this would be via CHECK constraints, but MySQL > > doesn't support them. > > CHECK constrain

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Jochem van Dieten
only way. In SQL you might be able to use an assertion depending on your exact needs. (Don't know if there is any database that actually implements them per the standard.) > The way to do this would be via CHECK constraints, but MySQL > doesn't support them. CHECK constraints won't

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Ledina Hido
On 19 Oct 2005, at 15:58, Martijn Tonies wrote: Second, is there any way of getting more details out of an error message? So for example, when doing a bulk upload to the database, rather than just getting "Cannot add or update a child row: a foreign key constraint fails" I would like to know

Re: Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Martijn Tonies
; In a way this can be seen as checking the multiplicity of the > relation between the two tables. I know one way would be using > triggers, but I was wondering if there was a way of specifying this > when the table is constructed. The way to do this would be via CHECK constraints, but My

Checking Multiplicity Constraints and Retrieving Details from Error Messages

2005-10-19 Thread Ledina Hido
As part of my 4th Year Group Design Project, I am required to build a database system that will validate and then store the data. As such I am currently investigating different DB, to choose the most suitable one. I like many features of MySQL but there are a couple of things I am not very

RE: ORACLE and Mysql: Create tables, constraints, swquences, storage. ..?

2005-07-26 Thread Edwin Cruz
ssage- From: Nguyen, Phong [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 26, 2005 7:55 AM To: mysql@lists.mysql.com Subject: ORACLE and Mysql: Create tables, constraints, swquences, storage. ..? Good morning, I have scripts to create constraints, sequences, storage..., tables from ORACLE and I

Re: ORACLE and Mysql: Create tables, constraints, swquences, storage. ..?

2005-07-26 Thread Josh Chamas
Nguyen, Phong wrote: Good morning, I have scripts to create constraints, sequences, storage..., tables from ORACLE and I don't know if I can create them in MySQL? You can try our Migration Toolkit which has pretty good support for Oracle now... http://www.mysql.com/products/migr

Re: ORACLE and Mysql: Create tables, constraints, swquences, storage. ..?

2005-07-26 Thread Martijn Tonies
Hi, > I have scripts to create constraints, sequences, storage..., tables from > ORACLE and I don't know if I can create them in MySQL? MySQL doesn't have "sequences" or "storage" specifiers. You cannot run your script directly. Depending on your current

ORACLE and Mysql: Create tables, constraints, swquences, storage. ..?

2005-07-26 Thread Nguyen, Phong
Good morning, I have scripts to create constraints, sequences, storage..., tables from ORACLE and I don't know if I can create them in MySQL? Appreciated your help, Thank you, Phong -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:

Re: constraints

2005-05-21 Thread Peter Brawley
Mathias, >The syntaxe is here, but the constraints seems not to be checked. Is this a bug >? i don't know ! >mysql> create table employee ( >-> name varchar(30), >-> salary numeric(10,2), >-> constraint check (salary > 0) >-> ); >Query OK,

Re: constraints

2005-05-21 Thread mfatene
>> The manual is your friend! I was trying to inform you but you were faster :o) An IF then insert in your application can do the trick. Mathias Selon Michael Stassen <[EMAIL PROTECTED]>: > The manual is your friend! CHECK constraints are not supported in > mysql. "The

Re: constraints

2005-05-21 Thread Michael Stassen
The manual is your friend! CHECK constraints are not supported in mysql. "The CHECK clause is parsed but ignored by all storage engines." <http://dev.mysql.com/doc/mysql/en/create-table.html>. Using your example, you can easily verify this with SHOW CREATE TABLE: mysql>

Re: constraints

2005-05-21 Thread mfatene
Hi, The syntaxe is here, but the constraints seems not to be checked. Is this a bug ? i don't know ! mysql> create table employee ( -> name varchar(30), -> salary numeric(10,2), -> constraint check (salary > 0) -> ); Query OK, 0 rows aff

Re: constraints

2005-05-20 Thread Rhino
Sent: Friday, May 20, 2005 6:49 PM Subject: constraints Hi, I need to do a constraint that checks if the field 'salary' of one table is not smaller than zero. Like: create table employee ( name varchar(30), salary numeric(10,2) constraint ck_salary check (salary >

constraints

2005-05-20 Thread Rodrigo Sakai
Hi, I need to do a constraint that checks if the field 'salary' of one table is not smaller than zero. Like: create table employee ( name varchar(30), salary numeric(10,2) constraint ck_salary check (salary > 0) ); What´s the sintaxe? I'am not finding the correct sintax

MyISAM and foreign key constraints?

2005-04-29 Thread Jacek Becla
Hi, MySQL docs claim at: http://dev.mysql.com/doc/mysql/en/ansi-diff-foreign-keys.html that "At a later stage, foreign key constraints will be implemented for MyISAM tables as well." Does anyone know what the timescale is? Thanks, Jacek -- MySQL General Mailing List For list arch

Re: change a column type and innodb foreign key constraints

2005-03-16 Thread SGreen
"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 bette

Re: change a column type and innodb foreign key constraints

2005-03-16 Thread Gabriel PREDA
> 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`

change a column type and innodb foreign key constraints

2005-03-16 Thread rich
`title` varchar(250) NOT NULL default '', `pmid` int(15) default NULL, `project` varchar(35) default NULL, `abstract` text, `datasource` smallint(5) unsigned default NULL, PRIMARY KEY (`id`), KEY `id` (`id`) ) TYPE=InnoDB that i need to change from smallint to int There are a numb

Re: Indices and Constraints.

2004-12-02 Thread SGreen
ank you. But I want select the constraints and indices used on the > > table. How can we get this information?. Please help me in this. > > Ian gave you the answer: > > > From: Ian Sales > [...] > > - show indexes from DATABASE_NAME.TABLE_NAME > > The synt

Re: Indices and Constraints.

2004-12-02 Thread Roger Baklund
[EMAIL PROTECTED] wrote: Hi, Thank you. But I want select the constraints and indices used on the table. How can we get this information?. Please help me in this. Ian gave you the answer: From: Ian Sales [...] - show indexes from DATABASE_NAME.TABLE_NAME The syntax is: SHOW INDEX FROM

RE: Indices and Constraints.

2004-12-02 Thread lakshmi.narasimharao
Hi, Thank you. But I want select the constraints and indices used on the table. How can we get this information?. Please help me in this. Thanks, Narasimha -Original Message- From: Ian Sales [mailto:[EMAIL PROTECTED] Sent: Thursday, December 02, 2004 5:07 PM To: Lakshmi NarasimhaRao

Re: Indices and Constraints.

2004-12-02 Thread Ian Sales
[EMAIL PROTECTED] wrote: Need to know the similar one in MySQL. Do we have views or any other system tables in MySQL 4.0.21 which OUTPUTS the constraints and indices in a particular table? - show indexes from DATABASE_NAME.TABLE_NAME - or, show create table DATABASE_NAME.TABLE_NAME; - ian

Re: Indices and Constraints.

2004-12-02 Thread electroteque
Thats usually setup in the same table schema no ? On 02/12/2004, at 9:52 PM, <[EMAIL PROTECTED]> wrote: Hi All, In oracle I can query user_constraints, user_indexes for getting the constraints and indices for a particular table. User_constraints and user_idexes are view which holds a

Indices and Constraints.

2004-12-02 Thread lakshmi.narasimharao
Hi All, In oracle I can query user_constraints, user_indexes for getting the constraints and indices for a particular table. User_constraints and user_idexes are view which holds all the constraints and indices for a particular table. Need to know the similar one in MySQL. Do we have views

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Michael Stassen
Varakorn Ungvichian wrote: --- Michael Stassen <[EMAIL PROTECTED]> wrote: Varakorn Ungvichian wrote: Just realised something: my table was MyIsam. I switched it to InnoDB (which support FKs), but now: 1. "Show Create Table" still doesn't show reference links, and Well, of course not. It won't sh

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Varakorn Ungvichian
--- Michael Stassen <[EMAIL PROTECTED]> wrote: > > Varakorn Ungvichian wrote: > > Just realised something: my table was MyIsam. I > > switched it to InnoDB (which support FKs), but > now: > > 1. "Show Create Table" still doesn't show > reference > > links, and > > Well, of course not. It won't

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Michael Stassen
Varakorn Ungvichian wrote: Just realised something: my table was MyIsam. I switched it to InnoDB (which support FKs), but now: 1. "Show Create Table" still doesn't show reference links, and Well, of course not. It won't show them until you create them, which you haven't done according to #2. 2.

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Martijn Tonies
> Just realised something: my table was MyIsam. I > switched it to InnoDB (which support FKs), but now: > 1. "Show Create Table" still doesn't show reference > links, and > 2. I can't seem to make foreign keys, because it > generates the error: "ERROR 1005: Can't create table > '.\ltab\#sql-60c_1

Re: How to retrieve constraints and links from MySQL tables?

2004-11-28 Thread Varakorn Ungvichian
Just realised something: my table was MyIsam. I switched it to InnoDB (which support FKs), but now: 1. "Show Create Table" still doesn't show reference links, and 2. I can't seem to make foreign keys, because it generates the error: "ERROR 1005: Can't create table '.\ltab\#sql-60c_11.frm' (errno: 1

Re: How to retrieve constraints and links from MySQL tables?

2004-11-27 Thread Varakorn Ungvichian
--- Martijn Tonies <[EMAIL PROTECTED]> wrote: > The only way to do this is via > SHOW CREATE TABLE I've just tried the command in question, but here's the result: CREATE TABLE `employees` ( `employee_id` tinyint(4) NOT NULL auto_increment, `employee_first` varchar(20) NOT NULL default '',

Re: How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Martijn Tonies
Hello, > You can use: > > show create table employee; > > or > > show table status like 'employee'; > in the column "comment" you have the information you are looking for. I don't think "comment" works properly - it's too s

RE: How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Mechain Marc
bre 2004 09:32 À : [EMAIL PROTECTED] Objet : How to retrieve constraints and links from MySQL tables? So, I'm running a MySQL database (version: 4.0.21) for a personal project of mine, and I would like to learn how to retrieve constraints and links from the table after it's been created

Re: How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Martijn Tonies
> So, I'm running a MySQL database (version: 4.0.21) for > a personal project of mine, and I would like to learn > how to retrieve constraints and links from the table > after it's been created. The create statements read > thusly: > When I run "show col

How to retrieve constraints and links from MySQL tables?

2004-11-26 Thread Varakorn Ungvichian
So, I'm running a MySQL database (version: 4.0.21) for a personal project of mine, and I would like to learn how to retrieve constraints and links from the table after it's been created. The create statements read thusly: CREATE TABLE positions ( position_id tinyint(4) DEFAULT &#

Re: Naming constraints

2004-10-08 Thread Martijn Tonies
> So how is it possible to drop a foreign key in a master / slave replication > ? the autogenerated-naming constraint should be different ? I have no idea. > How automatic database structure update can be executed (from a script > generetor like PowerDesigner) ? With regards, Martijn Tonies

Re: Naming constraints

2004-10-08 Thread Richard - CEDRICOM
lt;[EMAIL PROTECTED]> a écrit dans le message news: [EMAIL PROTECTED] > Hello, > > > I have problem in naming foreign key constraints : > > --8<-- > > > Actually, the name for the just created constraint is an 'internally > > generated id' (i.e :0_0

Re: Naming constraints

2004-10-08 Thread Martijn Tonies
Hello, > I have problem in naming foreign key constraints : --8<-- > Actually, the name for the just created constraint is an 'internally > generated id' (i.e :0_023), so the update script can't find the named > constraint 'fktblnumb' > > The "

Naming constraints

2004-10-08 Thread Richard - CEDRICOM
Hi, I have problem in naming foreign key constraints : Engine : mySql 4.1.1 and/or 5.0.0a System : Windows 2000 sp4 and / or win NT 4 sp6a Here is a script example of what I need to do : /* Script 1 */ CREATE TABLE tblphone ( nameid INT PRIMARY KEY AUTO_INCREMENT, fnameVARCHAR(30

RE: INSERT IGNORE like feature for rows failing foreign key constraints?

2004-08-31 Thread John McCaskey
e for rows failing foreign key constraints? I have a logging table where I insert a large number of rows every 5 minutes. For performance reasons this occurs in bulk inserts of about 5000 rows at a time. (ie. INSERT INTO table VALUES(...), (...), (...)) One of the fields in the table is an id

Re: Data loading and foreign key constraints - help please

2004-08-30 Thread Todd Cranston-Cuebas
Cranston-Cuebas <[EMAIL PROTECTED]> wrote on 08/29/2004 04:09:15 AM: I'm a total newbie to mySQL, but was hoping someone could answer a question regarding adding a record into a database that has foreign key constraints. Remember, I'm a total newbie so I'm hoping I'm using the

Data loading and foreign key constraints - help please

2004-08-29 Thread Todd Cranston-Cuebas
I'm a total newbie to mySQL, but was hoping someone could answer a question regarding adding a record into a database that has foreign key constraints. Remember, I'm a total newbie so I'm hoping I'm using the right words to express this. I'm taking a class that

INSERT IGNORE like feature for rows failing foreign key constraints?

2004-08-25 Thread John McCaskey
I have a logging table where I insert a large number of rows every 5 minutes. For performance reasons this occurs in bulk inserts of about 5000 rows at a time. (ie. INSERT INTO table VALUES(...), (...), (...)) One of the fields in the table is an id that connects it to another table. It is p

Re: How do I find out a table's constraints ?

2004-08-25 Thread Martijn Tonies
> What command should I use to find out a table's constraints? If you're talking about Foreign Key constraints, you can have a look at them via the SHOW CREATE TABLE statement. With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL &a

How do I find out a table's constraints ?

2004-08-25 Thread Nestor Florez
What command should I use to find out a table's constraints? Thanks, :-) Néstor Alberto Flórez Torres -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: foreign key constraints

2004-07-22 Thread Brian Mansell
Sergei, Check out Paul DuBois' book MySQL - The Definitive Guide (2nd edition). It has a few good chapters that discuss foreign key constraints. --bmansell Brian E. Mansell MySQL Professional On Thu, 22 Jul 2004 13:06:07 -0700, Sergei Skarupo <[EMAIL PROTECTED]> wrote: &g

foreign key constraints

2004-07-22 Thread Sergei Skarupo
Hi everyone, I'd like to learn more about foreign key constraints... I read this section of the manual... http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html Where can I find a more detailed description with some examples? Thanks, Sergei

InnoDB foreign key constraints

2004-07-15 Thread Glenn Sequeira
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

Re: Checking for FK constraints only after the transaction commited ????

2004-06-04 Thread Jochem van Dieten
Leandro Melo wrote: So, is there a way to only check for the FKs constraint at the end of the transaction, and not at the rigth moment of the insert Not in MySQL. Other databases have functionality named deferred constraints, where constraint checking is deferred to transaction commit, but

Re: Checking for FK constraints only after the transaction commited ????

2004-06-04 Thread Josh Trutwin
On Fri, 4 Jun 2004 09:39:44 -0300 (ART) Leandro Melo <[EMAIL PROTECTED]> wrote: > Hi, > i`m using mysql in a j2ee application with JBoss. > For best design practices i cannot add the > foreign-keys to the tables in the same "insert" as i > add the table data. Basically, i`ll add it a few > millise

Checking for FK constraints only after the transaction commited ????

2004-06-04 Thread Leandro Melo
Hi, i`m using mysql in a j2ee application with JBoss. For best design practices i cannot add the foreign-keys to the tables in the same "insert" as i add the table data. Basically, i`ll add it a few milliseconds latter (in the same transaction), but anyway it`s not in the same "insert". Then, i ha

Re: Foreign Key Constraints

2004-05-28 Thread Martijn Tonies
> > This makes perfectly sense. > > > > So, once again I dare to ask: what's the problem with NULLable > > Foreign Keys? It works fine :-) > > > > (now, who was it that said that FKs should be entered/exist > > always?) > > > > With regards, > > Here is the issue... > > If you go back to what he w

Re: Foreign Key Constraints

2004-05-28 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 28 May 2004 11:50 am, Martijn Tonies wrote: > This makes perfectly sense. > > So, once again I dare to ask: what's the problem with NULLable > Foreign Keys? It works fine :-) > > (now, who was it that said that FKs should be entered/exist > a

Re: Foreign Key Constraints

2004-05-28 Thread Jeff Smelser
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Friday 28 May 2004 11:50 am, Martijn Tonies wrote: > This makes perfectly sense. > > So, once again I dare to ask: what's the problem with NULLable > Foreign Keys? It works fine :-) > > (now, who was it that said that FKs should be entered/exist > a

  1   2   >