Insert Data insert statement is
used to insert data into the table.
insert into members (user, pass, page)
values ('Wang', 'Wang123', 'wang.asp');
insert into are key words which followed by the table name. Then followed
by a list of column names separated by commas and enclosed in parenthesis. Then
followed by the keyword values, followed by the list of values enclosed
in parenthesis.
In the example above, the
column name user will match up with the value 'Wang', and the column
name pass will match up with the value 'Wang123'.
Update Data
update statement
is used to change data in your database. The syntax is:
Update tablename set columnname = value
where columnname = value;
For example:
update members Set pass = 'John333'
where user = 'John';
When you update the data -- you should perform it very cautiously. If you do
not use key word where and specify a row, then all rows will be updated.
Delete Data
delete statement is used to delete rows of data. The syntax is:
Delete from tablename
where columnname = value
For example:
delete from members
where user = 'John';
Be careful! If you do not include a where clause, all of the rows in the
table will be deleted!
|