The LOAD DATA function in MySQL is a fast way of loading data, but what if there's raw data you don't want? Learn how to use variables and the SET syntax to avoid importing unwanted data.
- [Instructor] Now that we have our tables,…it's time to populate them.…Once again, we're going to use the load data…statement within the MySQL workbench.…So, I'll get started by opening…a new SQL tab and just like before we're going to…use the LOAD DATA LOCAL INFILE syntax.…Then, we're going to type the absolute path…to the data set and then we're…going to use double back slashes.…My data is in C Users…Brad Wheeler Desktop.…The file name is…accidents_2015.csv…and load this data…into the table accidents_2015…because this is a CSV FIELDS are…TERMINATED BY ','.…
Text is ENCLOSED BY '"'.…LINES are TERMINATED BY /n.…and, because we have a header row…in this CSV, we're going to IGNORE 1 LINES.…Now, here's where we need to assign the values…in the CSV to variables so we can assign them…to the columns in our table.…So, we'll start by opening the parenthesis…and, then, in MySQL variables are indicated…by an @ symbol before the variable name.…I'm going to want the first value in the CSV,…the accident severity.…We'll just call that column one.…
- Strengths and weaknesses of MySQL
- Creating a database
- Joining data sets
- Integrating Python with MySQL
- Searching a database
- CRUD operations
- Performing calculations
Skill Level Appropriate for all
1. Data and MySQL in under Five Minutes
2. Create a Database
3. Join Two Datasets
4. Search a Database
Searching a database1m 51s
5. Create, Read, Update, and Delete Operations
6. Averages and Calculations
Next steps1m 1s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.