window.repositoryObject = {"parameters_custom_fields":[],"object_id":"p388","name":"FN_INIT_TABLE","subtype":"PROCEDURE","is_user_defined":false,"description":null,"summary":[{"field":"Documentation","value":{"_type":"link","name":"style24@172.30.90.100","id":"d10"}},{"field":"Schema","value":""},{"field":"Name","value":"FN_INIT_TABLE"},{"field":"Type","value":"Procedure"}],"script":"begin\r\n    \r\n    set @queryStr = CONCAT('RENAME TABLE ',TABLE_NAME,' TO ',TABLE_NAME,'_DROP');\r\n    PREPARE query FROM @queryStr;\r\n    EXECUTE query;\r\n\r\n    set @queryStr = CONCAT('CREATE TABLE ',TABLE_NAME,' LIKE ',TABLE_NAME,'_DROP');\r\n    PREPARE query FROM @queryStr;\r\n    EXECUTE query;\r\n\r\n    set @queryStr = CONCAT('DROP TABLE ',TABLE_NAME,'_DROP');\r\n    PREPARE query FROM @queryStr;\r\n    EXECUTE query;\r\n    \r\nEND","parameters":[{"name":"TABLE_NAME","description":null,"mode":"IN","data_type":"varchar(100)","custom_fields":{}}],"dependencies":null,"imported_at":"2021-11-11 16:37"};