From the course: SQL Queries Made Easy

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Add rows in tables

Add rows in tables - SQL Tutorial

From the course: SQL Queries Made Easy

Start my 1-month free trial

Add rows in tables

- [Instructor] Now that we know a lot more about tables, let's learn about the various statements in SQL. The first one is DML statements. DMS stands for data manipulation language. DML statements are used to modify data in the tables. This includes insert, update, delete, and merge. The first one is the insert statement. We use insert statement to add new rows to our tables. This is the syntax. Using this, we can insert one row at a time. Now let's try to insert a few rows in our tables. First, this is how our table looks like. Select star from dept_tab, that's the table we are using now. I run this. This is our table. Now let's try to insert a row, insert into dept_tab values, I'm not giving the column names explicitly because I'm giving it in the same order, department number first, then department name, manager ID and the location ID. And I run this. Now if I want to change the order of the columns, then I…

Contents