MySQL Stored Procedure for searching in Table

Last Reply on Mar 26, 2015 02:15 AM By Mudassar

Posted on Mar 25, 2015 04:49 AM

how to create procedure search string in mysql

 

 

DELIMITER $$

USE `dbcoba`$$

DROP PROCEDURE IF EXISTS `carii`$$

CREATE DEFINER=`root`@`localhost` PROCEDURE `carii`(IN id_lembaga INT)
BEGIN
	  SELECT l.id_lembaga,p.propinsi_nama,k.kabupaten_nama,l.nama_lembaga,pr.peraturan_terkait
            FROM tbl_nama_lembaga l
            JOIN tbl_peraturan pr ON pr.id_peraturan=l.id_peraturan
            JOIN tbl_kabupaten k ON k.kabupaten_id=pr.kabupaten_id
            JOIN tbl_propinsi p ON p.propinsi_id=k.propinsi_id
            JOIN tbl_sektor sek ON sek.sektor_id=pr.sektor_id
            JOIN tbl_type_perda ty ON ty.type_id=pr.type_id
            WHERE l.id_lembaga=id_lembaga;
    END$$

DELIMITER ;

 

I agree, here is the link: https://www.e-iceblue.com/Introduce/spire-office-for-net-free.html