我有一个简单的过程来从列中选择数据并显示它们
DELIMITER //
DROP PROCEDURE IF EXISTS `testing`
CREATE PROCEDURE `testing`(IN param1 VARCHAR(40))
BEGIN
SELECT * FROM testingdatabase,
END //
DELIMITER;
但是我不断收到错误 1064
我有一个简单的过程来从列中选择数据并显示它们
DELIMITER //
DROP PROCEDURE IF EXISTS `testing`
CREATE PROCEDURE `testing`(IN param1 VARCHAR(40))
BEGIN
SELECT * FROM testingdatabase,
END //
DELIMITER;
但是我不断收到错误 1064
DELIMITER //
DROP PROCEDURE IF EXISTS `testing`//
CREATE PROCEDURE `testing`(IN param1 VARCHAR(40))
BEGIN
SELECT * FROM testingdatabase;
END //
DELIMITER ;
SELECT * FROM testingdatabase;
;
不使用,
所以应该是:
DELIMITER //
DROP PROCEDURE IF EXISTS `testing`//
CREATE PROCEDURE `testing`(IN param1 VARCHAR(40))
BEGIN
SELECT * FROM testingdatabase;
END //
DELIMITER ;
DELIMITER //
DROP PROCEDURE IF EXISTS testing//
CREATE PROCEDURE testing(IN param1 VARCHAR(40)) BEGIN
SELECT * FROM testingdatabase;
END //
DELIMITER ;
检查这个
DELIMITER $$
CREATE
PROCEDURE `testing`(IN param1 VARCHAR(40))
BEGIN
SELECT * FROM `test_table` WHERE `test_cdeo` LIKE param1;
END$$
DELIMITER ;
您可以通过 sql 命令调用并检查您的程序,如下面的代码
CALL testing('149514')