请原谅我的菜鸟问题,但想知道如何更改 mysql 中的数据库上下文?我知道在 SQL Server 中,它是:
USE [DBName];
那么mysql中有没有等价物?
In MySQL, if you want to change databases, you will also use use:
mysql> use DNNAME;
Same thing: use [database]; (the ; is optional here)
该use命令在 MySQL 中切换数据库。以下行
`use [database];`
将在数据库之间切换,您可以将数据库的实际名称替换为[database],例如use db1;.