Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Wildcard Operator and Truncate Command

Posted on 1998-10-15
2
Medium Priority
?
1,291 Views
Last Modified: 2012-08-14
Does Oracle support a wildcard operator?

I'd like to issue the command:

TRUNCATE TABLE TEST_PRE_*

and have Oracle truncate all tables that begin with TEST_PRE_

When I try to execute this statement, I get the error "SQL command not properly ended"  Is there a way to make this work?
0
Comment
Question by:aumdavis
2 Comments
 
LVL 3

Accepted Solution

by:
junfeb earned 30 total points
ID: 1082095
Nope! you'd have to specify individual table_names.

But though you could generate a scritp to truncate all tables with the TEst_

select 'truncate table '||table_name || ';' from user_tables where table_name like 'TEST_PRE%' ;

This will generate a script which you can then run.
0
 
LVL 1

Author Comment

by:aumdavis
ID: 1082096
Thanks for your help, junfeb.
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.
Suggested Courses

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question