MySQLs' "FOREIGN KEYS¨ - Mailing list pgsql-advocacy

From Rajesh Kumar Mallah
Subject MySQLs' "FOREIGN KEYS¨
Date
Msg-id 3FABCD70.1030009@trade-india.com
Whole thread Raw
Responses Re: [pgsql-advocacy] MySQLs' "FOREIGN KEYS¨
List pgsql-advocacy

MySQL does not thinks 0 to be a valid integer data .
Although 0 is not present in master table
it allows inserting in a referencing table
as though 0 == NULL . This is really funny (dangerous)


mysql> alter table slave add foreign key (id2) references master(id);
Query OK, 6 rows affected (0.00 sec)
Records: 6  Duplicates: 0  Warnings: 0


mysql> select * from master;
Empty set (0.00 sec)

mysql>


mysql> select * from slave;
+------+
| id2  |
+------+
|    0 |
|    0 |
|    0 |
|    0 |
|    0 |
|    0 |
+------+
6 rows in set (0.00 sec)

pgsql-advocacy by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Changes to Contributor List
Next
From: Shridhar Daithankar
Date:
Subject: Re: Urgent help needed for press contact