0

I want to create table so that when the query runs, it asks for the table name. I am sure this is a duplicate post but would like to know if this is possible with Oracle?

1 Answer 1

6

If you are using SQL*Plus, you can use substitution variables (&variable_name)

SQL> create table &name (
  2    col1 number,
  3    col2 date
  4  );
Enter value for name: fuzzy_bunny
old   1: create table &name (
new   1: create table fuzzy_bunny (

Table created.

SQL> select * from fuzzy_bunny;

no rows selected
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.