数据库use命令

Creating a database in MySQL 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.

在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 code 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, Facebook, 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, Facebook和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。

翻译自: https://www.thoughtco.com/use-sql-command-2693990

数据库use命令

数据库use命令_使用USE命令切换数据库相关推荐

  1. mysql数据库check命令_利用mysqlcheck命令快速修复mysql数据库

    表索引异常,修复msql表索引(表引擎:myisam) myisamchk --safe-recover /usr/local/mysql/data/ename_news/dede_arccache ...

  2. mysql数据库男和女怎么写命令_【MySQL】MySQL数据库操作命令大全

    1.创建数据库:create database Thinkgamer; 2.删除数据库:drop database Thinkgamer; 3.选择使用某个数据库:use Thinkgamer; 4. ...

  3. mysql 中有什么命令_常用mysql命令大全

    常用的MySQL命令大全 连接MySQL格式: mysql -h主机地址 -u用户名 -p用户密码 1.例1:连接到本机上的MYSQL. 首先在打开DOS窗口,然后进入目录 mysqlbin,再键入命 ...

  4. 阿里云 mysql 命令_是mysql命令

    mysql帮助命令使用说明 在安装.管理和使用mysql过程中,你是不是需要记忆很多的mysql命令.而且对于新手来说,很不多的命令不知道该如何应用,对于老手来说很多命令时间长了忘记具体的用法. 其实 ...

  5. 阿里云 mysql 命令_有mysql命令

    mysql帮助命令使用说明 在安装.管理和使用mysql过程中,你是不是需要记忆很多的mysql命令.而且对于新手来说,很不多的命令不知道该如何应用,对于老手来说很多命令时间长了忘记具体的用法. 其实 ...

  6. h3c配置snmp配置命令_配置单元命令

    h3c配置snmp配置命令 In this lesson on Apache Hive commands, we will go through the most common commands in ...

  7. mysql 命令执行drop 命令_(笔记)Mysql命令drop table:删除数据表

    drop table命令用于删除数据表. drop table命令格式:drop table ; 例如,删除表名为 MyClass 的表: mysql> drop table MyClass; ...

  8. mysql 数据库字符集转换_字符集介绍及mysql数据库编码转换

    一.字符集介绍: 1.ASCII ASCII是英文American Standard Code for Information Interchange的缩写,美国标准信息交换代码是由美国国家标准学会( ...

  9. mysql数据库字符集设置_查看和设置MySQL数据库字符集

    查看和设置MySQL数据库字符集作者:scorpio 2008-01-21 10:05:17 标签: 杂谈 Liunx下修改MySQL字符集:1.查找MySQL的cnf文件的位置find / -ina ...

最新文章

  1. JSP笔记-发送邮件
  2. log4j配置报错:ERROR Failed to load driver.ClassNotFoundException.
  3. 智能理财在国内国外的发展现状
  4. Spark与Flink:对比与分析
  5. 使用mount挂载一个windows的共享
  6. DAY77-Django框架(八)
  7. 淤泥管道机器人_丛台区设备管道清洗超高效率
  8. 黄金周添堵 U-Mail邮件系统拒垃圾保畅通管理有序
  9. FLEX:DataGrid分页.
  10. .NET Framework 托管与非托管代码
  11. 阿里规定代码中禁用这个,为何?
  12. 基于HTML5功能强大的滑块幻灯片
  13. Git——基本思想和工作原理(二)
  14. html5毕业设计程序,网页毕业设计制作流程
  15. 物联网工程毕业设计简介
  16. android 阻尼回弹,Android ListView实现阻尼回弹效果 并去除边缘阴影
  17. 神经网络中epoch、batch、batch_size、epoch、iteration理解
  18. wordpress网站设计入门6 菜单式样设置
  19. 最菜的我之打卡第三天
  20. 【RK3399】[Android 6.0] linux4.4 调试8723BU记录过程

热门文章

  1. Altium Designer 导出元器件库到Candence中使用,SCHLIB 转OLB
  2. 黑猴子的家:小白飞无人机
  3. 三元运算符判断0是为flse
  4. jquery 扑捉回车键触发的事件
  5. 【数据库原理及应用教程(第4版|微课版)陈志泊】【第四章习题】
  6. 微信支付对接流程及注意事项
  7. android tv侧边栏,Android Tv电视机盒子使用Recyclerview实现飞框动画
  8. SAP中难以按比例消耗原料的正确处理方法
  9. 2021金九银十面试季!如何化身BAT面试收割机
  10. 解决win10下无法输入反斜杠‘\’问题