Help using Base SAS procedures

How to give a value to a new added column in sql alter statement?

Reply
Regular Contributor
Posts: 222

How to give a value to a new added column in sql alter statement?

HI everyone,

Could anyoone can tell me how  to give a value to  a new added column in sql alter statement?

Thanks!

proc sql noprint;

ALTER TABLE sashelp.class ADD new2 num label='test'  value=1;

quit;

Respected Advisor
Posts: 4,644

Re: How to give a value to a new added column in sql alter statement?

Use the update statement :

proc sql noprint;

ALTER TABLE sashelp.class ADD new2 num label='test';

UPDATE sashelp.class SET new2=1;

quit;

PG

PG
Ask a Question
Discussion stats
  • 1 reply
  • 100 views
  • 0 likes
  • 2 in conversation