Searching...
Thursday, 24 April 2014

How to create Procedure in MySql?

10:39

1.Create a database and procedure

CREATE DATABASE `pretech`
DELIMITER $$
DROP PROCEDURE IF EXISTS `pretech`.`Helloworld` $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `Helloworld`()
BEGIN
 Select 'HELLO WORLD';
END $$
DELIMITER ;

2. Run it

CALL Helloworld()

3.Call procedure



image


0 comments: