MySQL DELIMITER Command
MySQL DELIMITER Command is a SQL statement in the MySQL Specific category. MySQL: changes the statement delimiter (default is ;) to allow semicolons inside stored procedures/triggers/functions. The syntax is DELIMITER //. It returns delimiter changed. A typical example: DELIMITER // CREATE PROCEDURE get_employees(IN dept_id INT) BEGIN SELECT * FROM employees WHERE department_id = dept_id; END // DELIMITER ; -- Now ; is back to normal delimiter -- The changed delimiter lets MySQL see the whole CREATE PROCEDURE as one statement A close relative is AUTO_INCREMENT, which mySQL auto-generates sequential integer values for this column. Commonly used with PRIMARY KEY. A close relative is ENGINE, which specifies the MySQL storage engine. InnoDB (default) supports transactions and foreign keys. MyISAM is faster for read-heavy. A close relative is LAST_INSERT_ID(), which returns the AUTO_INCREMENT value generated by the most recent INSERT in the current connection. More about this category: MySQL-specific features — AUTO_INCREMENT, ENGINE, SHOW TABLES, LIMIT.