简体   繁体   English

如何在mySQL工作台中运行sql脚本?

[英]How do I run an sql script in mySQL workbench?

I just download the SQL workbench and I cannot figure out how to run a simple SQL statement. 我只是下载SQL工作台,但无法弄清楚如何运行简单的SQL语句。 I know this seems like a simple question but how can this be done. 我知道这似乎是一个简单的问题,但是如何做到这一点。 It is not as simple as Microsoft Server. 它不像Microsoft Server那样简单。

Question: How to run a SQL query? 问题:如何运行SQL查询? As long as I am here how do you create a simple database? 只要我在这里,您如何创建一个简单的数据库?

在此处输入图片说明

似乎您未连接到数据库,请转到数据库下的主页并连接到其中一个并执行以下步骤

To run Workbench Script File(using shortcut) 运行Workbench脚本文件(使用快捷方式)

Modifier+Shift+R

The SQL Query panel allows SQL commands to be entered. “ SQL查询”面板允许输入SQL命令。 These may then be executed using the buttons in the toolbar displaying lightning bolts. 然后可以使用工具栏上显示闪电的按钮执行这些操作。 The leftmost “lightning” button is provided to execute the entire script contained within the SQL Query panel, whilst the second button executes only the currently selected statement. 提供最左侧的“lightning”按钮以执行“ SQL查询”面板中包含的整个脚本,而第二个按钮仅执行当前选定的语句。

Output from SQL statement execution appears in a Results panel located beneath the SQL Query panel. SQL语句执行的输出显示在“ SQL查询”面板下方的“结果”面板中。

also see this step by step tutorial on how to run script 另请参阅有关如何运行脚本的分步教程

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM