Storing data in a database is pretty important. Find out how to do this with the INSERT keyword.
- [Instructor] To add data to a database table,…we can use the Insert keyword.…To add information, we need to tell the database…a few important things.…So, the Insert clause has a few components…in addition to just Insert.…We need to tell it what table to add data to,…what field or fields to add information in,…and then the values to put in those fields.…Let's add a record to our People table…and add the first name Bob.…To do that, I'll write INSERT INTO people…and then in parentheses…the name of the field that I want to use,…in this case, first name.…
Then the VALUES keyword and again, in parentheses,…the information that I want to put into that field.…I'll run the statement and the database tells me…that my query was executed successfully…and that one row was affected.…That's what I'd expect.…I'm adding one record and so that would be one row.…Let's take a look at the table with SELECT *…FROM people.…
And down here at the bottom of the results,…there's record 1001, Bob.…The first-name field has what we added…and the rest of the fields have Null in them…
- What is SQL?
- Asking for data with SELECT
- Limiting database responses
- Organizing responses
- Asking for data from two or more tables
- Understanding join types and data types
- Transforming data
- Performing math
- Adding and modifying data in a table
Skill Level Beginner
1. Ask for Data from a Database
2. Ask for Data from Two or More Tables
3. Data Types, Math, and Helpful Functions
4. Add or Modify Data
- 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.