Answers for "LOAD EXCEL TO mysql"

SQL
1

mysql query return excel file

#Before exectue query in sql run following command:
sudo chmod 755 -R /var/lib/mysql/

#run query in mysql
SELECT ... FROM ... WHERE ... 
INTO OUTFILE 'file.csv'
FIELDS TERMINATED BY ','
OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY 'n';

#Then Open Excel and click on Data tab, 
#Click the From Text/CSV button,
#Navigate to the location of the exported .csv file and click Import
#Choose appropriate delimiter "comma"and click Transform Data
#Update column name, Close & Load.
Posted by: Guest on November-15-2020
0

sql query to import data from excel to mysql

$ mysql -u root -p --local-infile
mysql> create database boatdb;
mysql> use boatdb;
Posted by: Guest on March-02-2021

Code answers related to "SQL"

Browse Popular Code Answers by Language