Dynamic Views Alternative in mySQL
问题 I am trying to create a view in mySQL that gets created or updated when a user enters a specific value (woeid). I've tried to do this with the stored procedure below: DELIMITER $$ CREATE DEFINER=`root`@`%` PROCEDURE `sp_getChildren`( IN woeid INTEGER(15) ) BEGIN CREATE OR REPLACE VIEW `test`.`children` AS SELECT * FROM geoplanet_places gp WHERE gp.parent_id = woeid; END The above, or so I have read, is not possible in the current version of mySQL because a view, within a stored routine,