Chapter Contents

Previous

Next
DROP

DROP



Drops a column from a descriptor.

Optional statement
Applies to: access descriptor, view descriptor
Interacts with: RESET, SELECT, UPDATE


Syntax
Details

Syntax

DROP <'>column-identifier-1<'>
<...<'>column-identifier-n<'>>;


Details

The DROP statement drops the specified column from an access descriptor. The column cannot be selected for a view descriptor that is based on the access descriptor. However, the specified column in the PC file remains unaffected by this statement.

Note:   The DROP statement can only be specified when creating or updating an access descriptor, or when you are updating a view descriptor. DROP is not allowed when you are creating a view descriptor. When you use the UPDATE statement, you can specify DROP to remove a column from the view descriptor. However, the specified column in the PC file remains unaffected by the DROP statement.   [cautionend]

An editing statement, such as DROP, must follow the CREATE and database-description statements when you create an access descriptor. See CREATE for more information on the order of statements.

The column-identifier argument can be either the column name or the positional equivalent from the LIST statement, which is the number that represents the column's place in the access descriptor or view descriptor. For example, to drop the third and fifth columns, submit the following statement:

drop 3 5;

If the column name contains lowercase characters, special characters, or national characters, enclose the name in quotes. You can drop as many columns as you want in one DROP statement.

To display a column that was previously dropped, specify that column name in the RESET statement. However, doing so also resets all the column's attributes (such as SAS variable name, format, and so on) to their default values.


Chapter Contents

Previous

Next

Top of Page

Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.