Importing with a SQL script

To import with a SQL script, you can run this code:

LOAD DATA INFILE '/pathtoyourfiles/baseballdatabank-csv/csv-files/Teams.csv' 
INTO TABLE yourschema.teams
FIELDS TERMINATED BY ',';

Once the import is done, you can select the rows from the teams table to see the rows, as shown in the following screenshot: 

As long as your secure-file-priv option is not disabled, your script will import data into the managers table. 

If you want more details on LOAD DATA, visit the Further reading section. 

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.227.111.33