A SERVICE OF

logo

252 Updating DBMS Data Chapter 13
Output 13.11 Adding to DBMS Data
New Row in AIRLINE.SUPERV 1
OBS SUPID STATE JOBCAT
1 1677 CT BC
2 1834 NY BC
3 1431 CT FA
4 1433 NJ FA
5 1983 NY FA
6 1385 CT ME
7 1420 NJ ME
8 1882 NY ME
9 1935 CT NA
10 1417 NJ NA
11 1352 NY NA
12 1106 CT PT
13 1442 NJ PT
14 1118 NY PT
15 1405 NJ SC
16 1564 NY SC
17 1639 CT TA
18 1401 NJ TA
19 1126 NY TA
20 1588 NY FA
The next example deletes all employees who work in Connecticut from the DB2 table
Staff.
libname mydblib db2 ssid=db2;
proc sql;
delete from mydblib.staff
where state=’CT’;
quit;
options obs=20;
proc print data=mydblib.staff;
title "AIRLINE.STAFF After Deleting Connecticut Employees";
run;
Note: If you omit a WHERE clause when you delete rows from a table, all rows in
the table are deleted.
Partial output for this example is shown here.