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: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
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: Help required in using IN clause
Goto Forum:

Current Time: Mon Oct 24 07:50:39 CDT 2016

Total time taken to generate the page: 0.08438 seconds