[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 596
  • Last Modified:

Declaring variables in MySQL 5 Stored Procedure

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 ap_data.vendorNbr%TYPE;   This will make maintenance easier for when column lengths change.  Does anyone know whether such a feature exists?
0
lhalkapeel
Asked:
lhalkapeel
1 Solution
 
SqueebeeCommented:
I have not seen such a syntax yet in the documentation. You may wish to log a request at bugs.mysql.com.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now