Re: SQL Foreign Key

2006-03-12 Thread Andreas Krüger
Thanks Michael, that' s the problem. Syntactically my attempt was correct. Only I had the *value '1' in the only row that table `friends`contains, whereas table `category`was still empty*. (I was about creating the database for sample purposes.) When I tried to create the FOREIGN KEY out of fri

Re: SQL Foreign Key

2006-03-12 Thread Michael Stassen
Andreas Krüger wrote: 1) Sorry for not giving you the version: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. *mysql> SELECT VERSION(); +---+ | VERSION() | +---+ | 5.0.17-nt | +---+* 1 row in set (0.00 sec) InnoDB Status after failing i

SQL Foreign Key

2006-03-12 Thread Andreas Krüger
1) Sorry for not giving you the version: Microsoft Windows XP [Version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. *mysql> SELECT VERSION(); +---+ | VERSION() | +---+ | 5.0.17-nt | +---+* 1 row in set (0.00 sec) 2) Further, please note that the following output, of

Re: SQL Foreign Key

2006-03-12 Thread Martijn Tonies
Hello Andreas, You're not telling us what version of MySQL you're using, so I'll have to give it a shot in the dark ... > mysql> SHOW CREATE TABLE friends\G > *** 1. row *** >Table: friends > Create Table: CREATE TABLE `friends` ( > `id`

SQL Foreign Key

2006-03-12 Thread Andreas Krüger
This is a question onto defining foreign keys in a relational database. Foreign keys are featured by the InnoDB engine and therefore all three tables of the database use it: 1. `friends` main table 2. `relation` deploys a simple relation between rows of the main table, '1-2' means '1 is friend

Re: [SQL] foreign key from a table to the *same* table

2003-09-10 Thread Heikki Tuuri
Oy http://www.innodb.com Foreign keys, transactions, and row level locking for MySQL InnoDB Hot Backup - a hot backup tool for MySQL Order MySQL technical support from https://order.mysql.com/ - Original Message - From: ""Alberto"" <[EMAIL PROTECTED]> New

Fw: [SQL] foreign key from a table to the *same* table

2003-09-09 Thread Alberto
Hi to all...i've a problem...would anyone help me? I've a table called COURSES, where there are some universitary courses. I've a table called DIDACTIC_UNITS, where there are some subjects with some info like the professor, the course year, etc. The problem is that some didactic units can be lend