|
Fwd: Re: Foreign key: msg#01107db.mysql.general
-----------Sorry by my english, I'm brazilian------------------ I created the following tables in MySql database: create table person( id_person smallint not null primary key auto_increment, name varchar(10)); create table friends( id_friend smallint not null primary key auto_increment, age smallint, id_person smallint not null, foreign key (id_person) references person (id_person)); For example: I put a row in table PERSON with "id_person = 1" If I try to put in table FRIENDS "id_person = 7", I get...why? Should not give error? And the referential integrity? Thanks, Elby. _________________________________________________________________ MSN Photos é a maneira mais fácil e prática de editar e compartilhar sua fotos: http://photos.msn.com.br --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <mysql-thread113356@xxxxxxxxxxxxxxx> To unsubscribe, e-mail <mysql-unsubscribe-gcdmg-mysql=m.gmane.org@xxxxxxxxxxxxxxx> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Create Table Bug w/Varchar and Char: 01107, Mikhail Entaltsev |
|---|---|
| Next by Date: | RE: sum the values in a group by statement....: 01107, Cal Evans |
| Previous by Thread: | Increasing number of open_files -- no takers on this one?i: 01107, Sam Taylor |
| Next by Thread: | InnoDB made MyIsam DELETE's slow: 01107, Oleg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |