Home » SQL & PL/SQL » SQL & PL/SQL » %type variables
%type variables [message #217867] Mon, 05 February 2007 22:42 Go to next message
Messages: 1
Registered: February 2007
Junior Member
Hi all
I want to declare a variable using %type. I am using the table of another database and i want my variable in the PLSQL block to be of the same type as that of a column in this table. Like i wan to use

v_first table@someDB.first%type;

--some statemnets

When i exec this block, it says 'Unable to access another database

I have access to this database. Please let me know how to solve this...

Sampath Thiruvengadachari
Re: %type variables [message #217894 is a reply to message #217867] Tue, 06 February 2007 00:32 Go to previous message
vamsi kasina
Messages: 2108
Registered: October 2003
Location: Hyderabad, India
Senior Member
v_first table@someDB.first%type;

I assume table is the table name and first is the column name and someDB is databaselink name.

In this case, you have to refer the particular column as
instead of
Previous Topic: how to count columns in table
Next Topic: How to use LIKE inside Where & When clauses?
Goto Forum:

Current Time: Mon Aug 21 11:00:08 CDT 2017

Total time taken to generate the page: 0.11571 seconds