Unanswered: Include tablespace name in create table command using Execute Immediate
I want to creat a table using execute immediate that includes tablespace name in the create table command. But I don't know the tablespace name that the client is using. Can I incorporate in a script? If yes, then how?
I have written the following proc. While executing the same , it gives me :
ORA-00959: tablespace 'V_TABLESPACE_NAME' does not exist.
create or replace procedure pr_create_table as
select distinct tablespace_name into v_tablespace_name
where table_name like 'ABC%';
execute immediate 'create table temp_ABC
VALID VARCHAR2(10 BYTE) NOT NULL,
REFE VARCHAR2(50 BYTE) NOT NULL,
You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.