he insert statement is used to insert or add a row of data
into the table.
insert into "tablename"
(first_column,...last_column)
values (first_value,...last_value); [] = optional
Example:
insert into employee
(first, last, age, address, city, state)
values ('Luke', 'Duke', 45, '2130 Boars Nest', 'Hazard Co', 'Georgia');
* Note: All strings should be enclosed between single quotes: 'string'
To insert records into a table, enter the key words insert into followed
by the table name, followed by an open parenthesis, followed by a list of
column names separated by commas, followed by a closing parenthesis, followed
by the keyword values, followed by the list of values enclosed in parenthesis.
The values that you enter will be held in the rows and they will match up with
the column names that you specify. Strings should be enclosed in single
quotes, and numbers should not.
In the example above, the column name first will match up with the
value 'Luke', and the column name state will match up with the value
'Georgia'.
Insert statement
exercises_____
It is time to insert data into your new employee table.
Enter these employees into your table first, and then insert at least 5
more of your own list of employees in the table.
After they're inserted into the table, enter select statements to:
1 Select all columns for everyone in your employee table. 2 Select all columns for everyone with a salary over 30000. 3 Select first and last names for everyone that's under 30 years old. 4 Select first name, last name, and salary for anyone with "Programmer" in their title. 5 Select all columns for everyone whose last name contains "ebe". 6 Select the first name for everyone whose first name equals "Potsy". 7 Select all columns for everyone over 80 years old. 8 Select all columns for everyone whose last name ends in "ith".
Create at least 5 of your own select statements based on specific information
that you'd like to retrieve.