Home > Database > Mysql Tutorial > How to use MySQL Workbench

How to use MySQL Workbench

(*-*)浩
Release: 2019-05-11 09:51:22
Original
5755 people have browsed it

This article introduces the use of MySQL Workbench for everyone to learn and compare operations.

Recommended courses: MySQL Tutorial.

How to use MySQL Workbench

1. Layout introduction

2. Create database

Step 1: Click on the red area in the picture below


3. Create a data table

Step 1: Select the database and double-click

##After double-clicking

##Step 2: Right-click tables and select create tables;

Step 3: Fill in the table field information

PK: primary key

    NN: not null, not empty
  • UQ: unique unique index
  • BIN: binary binary data (larger than text)
  • UN: unsigned (non-negative number) )
  • ZF: zero fill fills with 0. For example, the field content is 1 int(4), then the content is displayed as 0001
  • AI: auto increment
  • can Double-click the information in the input field in the list above, or enter the information directly in the input box below.

#Step 5: After entering the field information, press Apply directly to end

4. Import data

Step 1: Right-click on the table and select Select Rows -Limit 1000

Step 2: Small amount Writing of data

For a small amount of data, fill in the data directly in the list

# #Step 3: A large number of data import methods

There are two ways to import the excel table in the workbench:Method 1:

Click where the arrow points button, select the .csv file (save excel as a sub-type file), confirm to complete the import; however, this method has a flaw, it is imported in the order of the fields in the table, and all excel fields need to be consistent with those in the table. The order of the fields is exactly the same, if not, just insert an empty column in excel;

Method 2:

is more complicated, but manual correspondence can be achieved :

1. Select the table to be imported and right-click, as shown in the figure: [Never select the first one]

2 , select the imported file to be prepared, and then keep next

Note: Click the button marked with a red circle to pop up the options (Opinions), and select CR LF ( Windows system "/r/n"); Encoding format utf-8; Select the corresponding fields in the list part as needed; then click Next until the execution is completed, then the data import can be completed;

The above is the detailed content of How to use MySQL Workbench. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template