Wishlist 0 ¥0.00

5分钟入门MySQL Workbench

1.打开Workbench,主页面上点击要connect的连接。
2.注意系统偏好设置里,MySQL是running的状态,否则无法执行。

 
 

创建数据库:

点击创建数据库按钮,输入数据库名称,选择编码方式,点击Apply。

 
 

Workbench会自动生成SQL语句,再次点击Apply就可以成功创建数据库:

 
 

成功后,在数据库列表中可以看到新建的数据库:

 
 

创建数据表:

右键新建的数据库BMI,设置为此次连接的默认数据库,接下来的所有操作都将在这个数据库下进行:

 
 

将BMI下拉单展开,点击Table,右键创建Table:

 
 

给Table命名,添加Column,设置Column的Datatype,PrimaryKey等属性。
点击Apply后,Workbench仍会自动生成SQL语句,再次点击Apply,成功创建新表,在左下角可以看到:

 
 
 
 

右键想要查看的Table,选择Select Rows,即可查看表中数据:

 
 
 

写入数据:

双击NULL处,即可写入数据,点击Apply,Workbench再次自动生成SQL语句,点击Apply,即可将数据写入表中:

 
 
 
 

运行sql文件:

打开或者新建sql script,点击运行即可:

 
 

剩下的就是MySQL的语法啦,可以查看下面的网址,中英文都有,内容是一样的:

中文教程:
http://www.runoob.com/mysql/mysql-insert-query.html
英文教程:
http://www.tutorialspoint.com/mysql/mysql-null-values.htm

About Us

Since 1996, our company has been focusing on domain name registration, web hosting, server hosting, website construction, e-commerce and other Internet services, and constantly practicing the concept of "providing enterprise-level solutions and providing personalized service support". As a Dell Authorized Solution Provider, we also provide hardware product solutions associated with the company's services.
 

Contact Us

Address: No. 2, Jingwu Road, Zhengzhou City, Henan Province

Phone: 0086-371-63520088 

QQ:76257322

Website: 800188.com

E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.