Is it possible to reference (Inn开发者_如何学编程oDB) a foreign key in another database in MySQL?
Is this bad practice?
Yes, it's possible on the same DB server. Prefix the database name when adding the constraint, e.g. databasename.tablename.fieldname. Watch your user permissions.
I don't consider it bad practice, though it's not something that should be happening very often.
Yes, You can use reference a foreign key in another database in MYSQL.
Thanks.
加载中,请稍侯......
精彩评论