mysql - Generic auto-increment foreign key -


i'm writing sql scripts run across platforms (mostly mysql , postgres). problem see cannot arrive @ common 1 auto-increment primary keys used foreign keys. there way ?

table t1 ( column c1 ) table t2 ( column c2 ) 

c1 auto increment , c2 foreign key referenced on c1.

i tried keeping c1 serial , c2 bigint/bigint unsigned/numeric , no luck.

really, futile try sql code work across multiple database platforms. there many variations on language.

in fact, syntax stored procedure differs between two. so, going have write separate scripts each database want support.


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -