Updating dataset to database
The general form of the UPDATE statement is If the master data set contains an observation that does not correspond to an observation in the transaction data set, the DATA step writes that observation to the new data set without modification.
An observation from the transaction data set that does not correspond to any observation in the master data set becomes the basis for a new observation.
To update a record in any table it is required to locate that record by using a conditional clause.
Below example uses primary key to match a record in employee table.
The following code shows a typical contains a client copy of the database data.
In this section, you will add a button that enables client data changes to be saved back to the database.
Datasheets are grids of data that look like Excel worksheets.
Try out following example to understand update operation.
You need to provide an employee ID to update an employee salary.
Data can be updated into My SQL tables by executing SQL UPDATE statement through PHP function mysql_query.
Below is a simple example to update records into employee table.