proc sql;
create table students (name varchar(12),
address varchar(20),
marks num(3));
quit;
proc sql;
insert into students
values('Anand','Hyderabad',80)
values('Siva','Bangalore',65)
values('aditya','Rjy',65)
values('Krishna','Pune',65)
values('vasu','Vja',65);
quit;
proc sql;
delete from students
where name='Krishna' marks=65;
quit;
Here i want to delete kirshna marks how to delete rows conditionally
If you want to delete the value of a specific column instead of a row, use update.
proc sql;
update students
set marks=null /* set null or . */
where name='Krishna';
quit;
You can delete rows this way.
proc sql;
delete from students
where name='Krishna' and marks=65;
quit;
or
proc sql;
delete from students
where name='Krishna';
quit;
To specify multiple conditions, use And, Or, etc. to connect them.
How delete krishna's marks only
If you want to delete the value of a specific column instead of a row, use update.
proc sql;
update students
set marks=null /* set null or . */
where name='Krishna';
quit;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.