mSQL Tutorial 6
The "Update" clause
The update clause would be useful if you wanted to replace the salary for a certain
employee.
The format for the update clause looks something like this:
UPDATE table_name SET column=value [ , column=value ]**
WHERE column OPERATOR value
[ AND | OR column OPERATOR value ]**
OPERATOR can be <,>, =, <=,>=, , or like
|
An example would be:
UPDATE emp_details SET salary=30000 WHERE emp_id=1234
|
In this example we are giving the guy who's employee ID is 1234 a raise to $30,000.00.
Aren't we generous?
So that's all of the mSQL clauses. I should mention that included in mSQL is a C
programming API. If you would like more information on that you can view the mSQL manual which gets into more detail
and from which I based this tutorial.
One other thing to mention is that PHP/FI comes with a set of built in commands to handle
all of these clauses. You can view them by checking out the PHP/FI
- mSQL tutorial.
|