Ram
Ram

Reputation: 1084

PL/SQL: Assign a data type to a variable

Is there anyway to do this? I want it to be done like this:

create or replace
package SOME_PACKAGE as
  filetype type is clob%type; --assign clob's filetype to a variable
end SOME_PACKAGE;
/

declare
  clb SOME_PACKAGE.filetype;
begin
  dbms_lob.writeappend(clb, 1, 's');
end;

Thanks!

Upvotes: 0

Views: 156

Answers (1)

A.B.Cade
A.B.Cade

Reputation: 16915

You can do it like this:

create or replace
package SOME_PACKAGE as
  subtype filetype is clob; --assign clob's filetype to a variable
end SOME_PACKAGE;
/

But why ??

Upvotes: 1

Related Questions