[英]How to determine no of parameters in a stored procedure in mysql from java
I want to build an application which determines no of parameters in a stored procedure . 我想构建一个确定存储过程中没有参数的应用程序。 Let the no of parameters in a stored procedure is x .
令存储过程中的参数编号为x。 Then the application create x JLabel in the form .
然后,应用程序以形式创建x JLabel。
I cant determine no of parameters in a stored procedure . 我无法确定存储过程中没有参数。 How can I do that ?
我怎样才能做到这一点 ?
You can do a regular query using Java on information_schema
database to obtain the number of parameters of a stored procedure: 您可以在
information_schema
数据库上使用Java进行常规查询,以获取存储过程的参数数量:
SELECT * FROM INFORMATION_SCHEMA.PARAMETERS
WHERE
SPECIFIC_SCHEMA = 'your_database_name'
AND SPECIFIC_NAME='your_procedure_name'
ORDER BY ORDINAL_POSITION;
You can see the structure of parameters
table here . 您可以在此处查看
parameters
表的结构。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.