Altering Columns in a Table
Overview
You have seen how to delete rows
in a table using the DELETE statement. To add, drop (delete), or modify
columns in a table, use the ALTER TABLE statement.
General form, ALTER
TABLE statement:
ALTER TABLE table-name
<ADD column-definition-1<,
... column-definition-n>>
<DROP column-name-1<,
... column-name-n>>
<MODIFY column-definition-1<,
... column-definition-n>>;
table-name
specifies the name
of the table in which columns will be added, dropped, or modified.
<ADD, DROP, MODIFY>
at least one of the
following clauses must be specified:
ADD
specifies one or more column-definitions
for columns to be added.
DROP
specifies one or more column-name ... |
Get SAS Certification Prep Guide, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.