Importing the CSV File in MySQL Workbench
Many times, it is difficult to insert data into tables manually if the count of the rows is large. In MySQL workbench, you can import records from a CSV file. The procedure for importing the CSV file is given below. In this blog, we will discuss about Importing the CSV file in MySQL Workbench.
For Free, Demo classes Call: 020 7117 1500
Registration Link: Click Here!
Let us consider Emp.csv file as shown below.
Step 1: Create database in MySQL and select the database
create database demo456;
use demo456;
Step 2: Create a structure of the table as follows in MYSQL
CREATE TABLE basic_pays(
employee_name VARCHAR(50) NOT NULL,
department VARCHAR(50) NOT NULL,
salary INT NOT NULL,
PRIMARY KEY (employee_name , department)
);
Step 3: Check whether a table is created. Currently the table is empty.
Select * from basic_pays;
Step 4: Click on “Import records from an external file”
For Free, Demo classes Call: 020 7117 1500
Registration Link: Click Here!
Step 5: Browse to the location where csv file is stored and click on Next
Step 6: As we have already created a table basic_pays in the database demo456, select the option for “Use existing table” and click Next
Step 7: Check source and destination columns. Click on Next
For Free, Demo classes Call: 020 7117 1500
Registration Link: SQL Training in Pune!
Step 8: Click on Next to import the data.
Step 9: Click on Finish to complete the procedure for importing the data
This is one of the ways to import large CSV files in MySQL workbench.
Do watch our Channel to learn more: Click Here
Author:
Karishma Pawar
Call the Trainer and Book your free demo Class For SQL Call now!!!
| SevenMentor Pvt Ltd.
© Copyright 2021 | SevenMentor Pvt Ltd.