Bug #3286 Enhancement to Stored Procedure variables
Submitted: 24 Mar 2004 11:13 Modified: 2 Dec 2005 18:42
Reporter: Lynette Halka-Peel
Status: Verified
Category:Server: SP Severity:S4 (Feature request)
Version:5.0 alpha OS:Microsoft Windows (Windows 2000)
Assigned to: Target Version:
Triage: Triaged: D5 (Feature request)

[24 Mar 2004 11:13] Lynette Halka-Peel
Description:
I would like to avoid specifying the exact type and column length of a variable in a
stored procedure when using cursors.  For example, instead of declare vendorNbr
varchar(16), I want to use a feature like Oracle has:  declare vendornbr
my_Table.vendorNbr%TYPE;   This will make maintenance easier for when column lengths
change.  

How to repeat:
n/a

Suggested fix:
implementation of a way for a stored procedure variable to inherit it's data type and
column length from the table specified.
[2 Dec 2005 18:42] Valeriy Kravchuk
Thank you for a reasonable feature request. Yes, Oracle PL/SQL's %TYPE (and %ROWTYPE)
attributes are useful. I hope something similar will be implemented in MySQL some day.
[12 Nov 2008 7:41] Valeriy Kravchuk
Bug #40593 was marked as a duplicate of this one.