Output 4.2 Rows Inserted with the SET Clause
Note the following features of SET clauses:
• As with other SQL clauses, use commas to separate columns. In addition, you must
use a semicolon after the last SET clause only.
• If you omit data for a column, then the value in that column is a missing value.
• To specify that a value is missing, use a blank in single quotation marks for character
values and a period for numeric values.
Inserting Rows with the VALUES Clause
With the VALUES clause, you assign values to a column by position. The following
INSERT statement uses multiple VALUES clauses to add rows to NewCcountries.
Recall that NewCountries has six columns, so it is necessary to specify a value or an
appropriate missing value for all six columns. See the results of the DESCRIBE TABLE
statement in “Creating Tables like an Existing Table” on page 115 for information about
the columns of NewCountries.
libname sql 'SAS-library';
insert into sql.newcountries
values ('Pakistan', 'Islamabad', 123060000, ., ' ', .)
values ('Nigeria', 'Lagos', 99062000, ., ' ', .);
title "World's Largest Countries";
select name format=$20.,
Inserting Rows into Tables 117