BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello,

I am new to SAS. Is there a way to drop a database table without using SAS SQL PROC? For example, the following code snippet only deletes content from the database table but not drops the table altogether right?

sqltest ODBC uid=&sql_user pwd=&sql_pass dsn=ermll;

data test;
x='a'; y=1; output;
x='b'; y=2; output;
x='c'; y=3; output;
x='d'; y=4; output;
x='e'; y=5; output;
x='f'; y=6; output;
x='g'; y=7; output;
x='h'; y=8; output;
run;
proc print data=test; run;

/***Load Data***/
proc delete data=sqltest.test; run;
data sqltest.test;
set test;
run;

Thank you!
3 REPLIES 3
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Regarding "..drop a database table.." -- presume this means a SAS database table or SAS data set or a SAS data library member. Yes - check PROC DATASETS.

Scott Barry
SBBWorks, Inc.

Recommended Google advanced search argument, this topic/post:

delete sas table site:sas.com
deleted_user
Not applicable
What I meant to say is I want to drop a oracle database table from SAS without using PROC SQL, not just to clear everything from that table. Is there a way to do that?
Flip
Fluorite | Level 6
Look into SQL passthrough

proq sql;
connect to oracle ....;
execute( drop table xxx) by oracle;

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2222 views
  • 0 likes
  • 3 in conversation