Set MySQL delimiter inside an sql-file
I want to set the delimiter inside an sql file (because I cannot rely on users to do that through the terminal). Is there a mysql statement that will allow me to set the delimiter? Using DELIMITER // throws an error. # Categories schema # --- !Ups CREATE TABLE IF NOT EXISTS `category` ( `id` INT NOT NULL AUTO_INCREMENT , `pid` INT NULL DEFAULT 0 , `label` VARCHAR(64) NULL , `active` TINYINT NULL DEFAULT 0, PRIMARY KEY (`id`) ); DELIMITER // CREATE FUNCTION hierarchy_connect_by_parent_eq_prior_id(value INT) RETURNS INT NOT DETERMINISTIC READS SQL DATA BEGIN DECLARE _id INT; DECLARE _parent INT;
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.