Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

create column that already exists mysql

DROP PROCEDURE IF EXISTS `?`;
DELIMITER //
CREATE PROCEDURE `?`()
BEGIN
  DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
  ALTER TABLE `table_name` ADD COLUMN `column_name` INTEGER;
END //
DELIMITER ;
CALL `?`();
DROP PROCEDURE `?`;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #column #exists #mysql
ADD COMMENT
Topic
Name
9+2 =