Updating 2 tables

posted by | Leave a comment

The SELECT clause displays the table before the updates. The FROM clause specifies EMPLOYEES as the table to select from. The UPDATE statement updates the values in EMPLOYEES.The SET clause specifies that the data in the Salary column be multiplied by 1.04 when the job code ends with a 1 and 1.025 for all other job codes.(The two underscores represent any character.) The CASE expression returns a value for each row that completes the SET clause.

The following CREATE TABLE statement creates the NEWSTATES table: proc sql; create table sql.newstates (state char(2), /* 2-character column for */ /* state abbreviation */ date num /* column for date of entry into the US */ informat=date9.

/* with an informat */ format=date9., /* and format of DATE9.

*/ population num); /* column for population */ The table NEWSTATES has three columns and 0 rows.

The char(2) modifier is used to change the length for State.

Use the DESCRIBE TABLE statement to verify that the table exists and to see the column attributes.

Leave a Reply

gratis poolse dating site