Hello NG,

I have to migrate a postgres database to a mysql data-
base. There are some problems applying this.
How can I implement a reference in phpmyadmin between 
two fields from two different tables, so that the 
two fields of the two different tables
have the same values? 
And when I have to fill the two tables by using 
the insert into command, which values of the 
referenced fields do I have to take 
using the insert into command? The primary key, 
auto_increment field of the first table do not need 
a value by building the insert into command
like postgres doing it by sequences.
The autoincrementation of this field is working fine for me.
But the other referenced field of my table two? 

In my postgres database, the value of the 
insert into command of the table 2 is 
currval(sequence).There are severally such insert into 
commands back-to-back:

insert into table1 (authorid, lastname, firstname) 
values (nextval('s_authors'), 'Meyers', 'Scott');

insert into table2 (authorid, title, subtitle)
values (currval('s_authors'), 'Effektiv C++ Programmieren',
'50 Wege zur Verbesserung Ihrer Programme und Entwuerfe');

How to in mysql?


Best regards
Andreas 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to