数据库use命令_使⽤USE命令切换数据库
数据库use命令
Creating a database in doesn't select it for use. You have to indicate it with the USE command. The USE command is also used when you have more than one database on a MySQL server and need to switch between them.
access转mysql教程视频在中创建数据库不会选择使⽤它。 您必须使⽤USE命令进⾏指⽰。 当您在⼀个MySQL服务器上有多个数据库并且需要在它们之间进⾏切换时,也会使⽤USE命令。
You must choose the correct database each time you start a MySQL session.
每次启动MySQL会话时,都必须选择正确的数据库。
MySQL中的USE命令 ( The USE Command in MySQL )
The syntax for the USE command is:
USE命令的语法为:
mysql>
For example, this code switches to the database named "Dresses."
例如,此代码切换到名为“连⾐裙”的数据库。
mysql>
After you select a database, it remains the default until you end the session or choose another database with the USE command.
选择数据库后,它将保留默认值,直到您结束会话或使⽤USE命令选择另⼀个数据库为⽌。
识别当前数据库 ( Identifying the Current Database )
If you are unsure which database is currently in use, use the following code:
如果不确定当前正在使⽤哪个数据库,请使⽤以下代码:
This returns the name of the database currently in use. If no database is currently in use, it returns NULL.
此返回当前正在使⽤的数据库的名称。 如果当前未使⽤任何数据库,则返回NULL。
To view a list of available databases, use:
要查看可⽤数据库的列表,请使⽤:
关于MySQL ( About MySQL )
MySQL is an open-source relational database management system that is most often associated with web-based applications. It is the database software of choice for many of the web's largest sites including Twitter, , and YouTube. It is also the most popular database management system for small and medium-sized websites. Almost every commercial web host offers MySQL services.
MySQL是⼀种开源关系数据库管理系统,通常与基于Web的应⽤程序相关联。 它是许多Web最⼤站点(包括Twitter, 和YouTube)的⾸选数据库软件。 它也是最受欢迎的中⼩型⽹站数据库管理系统。 ⼏乎每个商业⽹络主机都提供MySQL服务。
If you are just using MySQL on a website, you won't need to be involved with the coding—the web host will handle all that—but if you are a developer new to MySQL, you'll need to learn SQL to write programs that access MySQL.
如果您只是在⽹站上使⽤MySQL,则⽆需参与编码-⽹络主机将处理所有这些⼯作-但是,如果您是MySQL的新开发⼈员,则需要学习SQL 编写程序访问MySQL。
数据库use命令

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。