Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 sql 文件,用于将新记录添加到数据库中。它涉及大量重新格式化数据,因为目标的标准化程度远大于源。我可以像最初一样声明表名吗
srcdb = 'dump_130113'; targetdb = 'test';
然后像这样引用它们
select * from srcdb.tablename;
我知道
use database_name;
问题是这样做甚至需要多次来回切换。