{"id":287,"date":"2009-12-05T19:42:01","date_gmt":"2009-12-05T19:42:01","guid":{"rendered":"http:\/\/kedar.nitty-witty.com\/?p=287"},"modified":"2024-02-09T04:19:26","modified_gmt":"2024-02-09T04:19:26","slug":"stored-procedure-execute-query-if-table-or-column-exists","status":"publish","type":"post","link":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists","title":{"rendered":"MySQL Stored procedure \u2013 Execute query if table or Column exists"},"content":{"rendered":"Well procedures mainly carried out working with information schema and it&#8217;s usage in stored procedure.\u00a0Procedures are fairly simple and easy to understand.\r\n\r\n<strong>1. Edit_table \u2013 following procedure executes queries to particular table if it exists.<\/strong>\r\n\r\n&nbsp;\r\n\r\nBasically I created it to satisfy a need of altering a table if column exists.\r\n\r\nNow it can be used to execute any query if table exists.\r\n\r\n\r\n<pre>Usage: call Edit_table(database-name,table-name,query-string);<\/pre>\r\n&#8211; Procedure will check for existence of table-name under database-name and will execute query-string if it exists.\r\n\r\n<strong>Download Stored Procedure: <a title=\"\" href=\"https:\/\/kedar.nitty-witty.com\/blog\/wp-content\/uploads\/2009\/12\/edit_table.sql\">Edit_table<\/a><\/strong>\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>DELIMITER $$\r\n\r\nDROP PROCEDURE IF EXISTS `Edit_table` $$\r\nCREATE PROCEDURE `Edit_table` (in_db_nm varchar(20),in_tbl_nm varchar(20),in_your_query varchar(200))\r\nDETERMINISTIC\r\nBEGIN\r\n\r\nDECLARE var_table_count INT;\r\n\r\nselect count(*) INTO @var_table_count from information_schema.TABLES where\u00a0 TABLE_NAME=in_tbl_nm and TABLE_SCHEMA=in_db_nm;\r\nIF (@var_table_count &gt; 0) THEN\r\nSET @in_your_query = in_your_query;\r\n#SELECT @in_your_query;\r\nPREPARE my_query FROM @in_your_query;\r\nEXECUTE my_query;\r\n\r\nELSE\r\nselect \"Table Not Found\";\r\nEND IF;\r\n\r\nEND $$\r\nDELIMITER ;<\/code><\/pre>\r\n&nbsp;\r\n\r\n<strong>1A. A slight variation of this procedure is editing a table if column exists.<\/strong>\r\n\r\n&nbsp;\r\n\r\n<strong>Download Stored Procedure: <\/strong><a title=\"\" href=\"https:\/\/kedar.nitty-witty.com\/blog\/wp-content\/uploads\/2009\/12\/edit_table_column.sql\" target=\"_blank\" rel=\"noopener\"><strong>Edit_table_column<\/strong><\/a>\r\n\r\n&nbsp;\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>DELIMITER $$\r\n\r\nDROP PROCEDURE IF EXISTS `Edit_table_column` $$\r\nCREATE DEFINER=`root`@`localhost` PROCEDURE `Edit_table_column`(in_db_nm varchar(20),in_tbl_nm varchar(20),in_colm_nm varchar(20),in_your_query varchar(200))\r\nDETERMINISTIC\r\nBEGIN\r\n\r\nDECLARE var_table_count INT;\r\n\r\nselect count(*) INTO @var_table_count from information_schema.COLUMNS where\u00a0 TABLE_NAME=in_tbl_nm and TABLE_SCHEMA=in_db_nm and COLUMN_NAME=in_colm_nm;\r\nIF (@var_table_count &gt; 0) THEN\r\nSET @in_your_query = in_your_query;\r\nSELECT @in_your_query;\r\nPREPARE my_query FROM @in_your_query;\r\nEXECUTE my_query;\r\n\r\nELSE\r\nselect \"Table Not Found\";\r\nEND IF;\r\n\r\nEND $$\r\nDELIMITER ;<\/code><\/pre>\r\n&nbsp;\r\n\r\n\r\n<pre class=\"wp-block-code\"><code>Usage: call Edit_table_column(database-name,table-name,column-name,query-string);<\/code><\/pre>\r\n","protected":false},"excerpt":{"rendered":"Well procedures mainly carried out working with information schema and it&#8217;s usage in stored procedure.\u00a0Procedures are fairly simple and easy to understand. 1. Edit_table \u2013 following procedure executes queries to&hellip;\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[8,378],"tags":[918,210,211,919,108],"class_list":["post-287","post","type-post","status-publish","format-standard","category-mysql","category-mysql-scripts-mysql","tag-alter-table-if-column-exist","tag-create-table-if-exists","tag-execute-query-if-exists","tag-mysql-conditional-command-execution","tag-stored-procedure"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.10 - aioseo.com -->\n\t<meta name=\"description\" content=\"MySQL Stored procedure - Execute query if table or Column exists\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Kedar\"\/>\n\t<meta name=\"google-site-verification\" content=\"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA\" \/>\n\t<meta name=\"msvalidate.01\" content=\"116B62074CBCA1BA99B8CCE09CCF2FB8\" \/>\n\t<meta name=\"keywords\" content=\"execute query,if exists,stored procedure,mysql,information_schema,query,execute,alter table if column exist,create table if exists,execute query if exists,mysql conditional command execution\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.10\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Change Is Inevitable | Kedar Vaijanapurkar&#039;s Blog for MySQL, technology and various subjects\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable\" \/>\n\t\t<meta property=\"og:description\" content=\"MySQL Stored procedure - Execute query if table or Column exists\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-12-05T19:42:01+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2024-02-09T04:19:26+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable\" \/>\n\t\t<meta name=\"twitter:description\" content=\"MySQL Stored procedure - Execute query if table or Column exists\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#article\",\"name\":\"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable\",\"headline\":\"MySQL Stored procedure \\u2013 Execute query if table or Column exists\",\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#articleImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"},\"datePublished\":\"2009-12-05T19:42:01+00:00\",\"dateModified\":\"2024-02-09T04:19:26+00:00\",\"inLanguage\":\"en-US\",\"commentCount\":2,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#webpage\"},\"articleSection\":\"MySQL, MySQL-Scripts, alter table if column exist, Create table if exists, execute query if exists, mysql conditional command execution, stored procedure\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"position\":2,\"name\":\"MySQL\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql#listItem\",\"name\":\"MySQL-Scripts\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql#listItem\",\"position\":3,\"name\":\"MySQL-Scripts\",\"item\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#listItem\",\"name\":\"MySQL Stored procedure \\u2013 Execute query if table or Column exists\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql#listItem\",\"name\":\"MySQL\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#listItem\",\"position\":4,\"name\":\"MySQL Stored procedure \\u2013 Execute query if table or Column exists\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/category\\\/mysql\\\/mysql-scripts-mysql#listItem\",\"name\":\"MySQL-Scripts\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#personImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin\",\"name\":\"Kedar\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Kedar\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#webpage\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists\",\"name\":\"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable\",\"description\":\"MySQL Stored procedure - Execute query if table or Column exists\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/stored-procedure-execute-query-if-table-or-column-exists#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/author\\\/admin#author\"},\"datePublished\":\"2009-12-05T19:42:01+00:00\",\"dateModified\":\"2024-02-09T04:19:26+00:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/\",\"name\":\"..::CHANGE is INEVITABLE::..\",\"description\":\"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/kedar.nitty-witty.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable","description":"MySQL Stored procedure - Execute query if table or Column exists","canonical_url":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists","robots":"max-image-preview:large","keywords":"execute query,if exists,stored procedure,mysql,information_schema,query,execute,alter table if column exist,create table if exists,execute query if exists,mysql conditional command execution","webmasterTools":{"google-site-verification":"_Bu1h5r0PxIC0D2jBVdmYN45RTeG9ogcX85XLkbG1qA","msvalidate.01":"116B62074CBCA1BA99B8CCE09CCF2FB8","miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#article","name":"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable","headline":"MySQL Stored procedure \u2013 Execute query if table or Column exists","author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"},"image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#articleImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"},"datePublished":"2009-12-05T19:42:01+00:00","dateModified":"2024-02-09T04:19:26+00:00","inLanguage":"en-US","commentCount":2,"mainEntityOfPage":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#webpage"},"isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#webpage"},"articleSection":"MySQL, MySQL-Scripts, alter table if column exist, Create table if exists, execute query if exists, mysql conditional command execution, stored procedure"},{"@type":"BreadcrumbList","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/kedar.nitty-witty.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","position":2,"name":"MySQL","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql#listItem","name":"MySQL-Scripts"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql#listItem","position":3,"name":"MySQL-Scripts","item":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql","nextItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#listItem","name":"MySQL Stored procedure \u2013 Execute query if table or Column exists"},"previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql#listItem","name":"MySQL"}},{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#listItem","position":4,"name":"MySQL Stored procedure \u2013 Execute query if table or Column exists","previousItem":{"@type":"ListItem","@id":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql#listItem","name":"MySQL-Scripts"}}]},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#personImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"Person","@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author","url":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin","name":"Kedar","image":{"@type":"ImageObject","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/be1f7021485c325d92cc4c5d961accb9c1af72b1b11281a790f7f4f066ef10d3?s=96&d=mm&r=g","width":96,"height":96,"caption":"Kedar"}},{"@type":"WebPage","@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#webpage","url":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists","name":"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable","description":"MySQL Stored procedure - Execute query if table or Column exists","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists#breadcrumblist"},"author":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"creator":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/author\/admin#author"},"datePublished":"2009-12-05T19:42:01+00:00","dateModified":"2024-02-09T04:19:26+00:00"},{"@type":"WebSite","@id":"https:\/\/kedar.nitty-witty.com\/blog\/#website","url":"https:\/\/kedar.nitty-witty.com\/blog\/","name":"..::CHANGE is INEVITABLE::..","description":"Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","inLanguage":"en-US","publisher":{"@id":"https:\/\/kedar.nitty-witty.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Change Is Inevitable | Kedar Vaijanapurkar's Blog for MySQL, technology and various subjects","og:type":"article","og:title":"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable","og:description":"MySQL Stored procedure - Execute query if table or Column exists","og:url":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists","article:published_time":"2009-12-05T19:42:01+00:00","article:modified_time":"2024-02-09T04:19:26+00:00","twitter:card":"summary","twitter:title":"MySQL Stored procedure - Execute query if table or Column exists | Change Is Inevitable","twitter:description":"MySQL Stored procedure - Execute query if table or Column exists"},"aioseo_meta_data":{"post_id":"287","title":"MySQL Stored procedure - Execute query if table or Column exists | #site_title","description":"MySQL Stored procedure - Execute query if table or Column exists","keywords":[{"label":"execute query","value":"execute query"},{"label":"if exists","value":"if exists"},{"label":"Stored procedure","value":"Stored procedure"},{"label":"mysql","value":"mysql"},{"label":"information_schema","value":"information_schema"},{"label":"query","value":"query"},{"label":"execute","value":"execute"}],"keyphrases":{"focus":{"keyphrase":"","score":0,"analysis":{"keyphraseInTitle":{"score":0,"maxScore":9,"error":1}}},"additional":[]},"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":"","og_custom_url":null,"og_article_section":null,"og_article_tags":[],"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":"-1","robots_max_videopreview":"-1","robots_max_imagepreview":"large","priority":null,"frequency":"default","location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-24 17:42:26","updated":"2025-08-16 19:01:23","seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\" title=\"MySQL\">MySQL<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql\" title=\"MySQL-Scripts\">MySQL-Scripts<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tMySQL Stored procedure \u2013 Execute query if table or Column exists\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/kedar.nitty-witty.com\/blog"},{"label":"MySQL","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql"},{"label":"MySQL-Scripts","link":"https:\/\/kedar.nitty-witty.com\/blog\/category\/mysql\/mysql-scripts-mysql"},{"label":"MySQL Stored procedure \u2013 Execute query if table or Column exists","link":"https:\/\/kedar.nitty-witty.com\/blog\/stored-procedure-execute-query-if-table-or-column-exists"}],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/comments?post=287"}],"version-history":[{"count":10,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/287\/revisions"}],"predecessor-version":[{"id":3264,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/posts\/287\/revisions\/3264"}],"wp:attachment":[{"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/media?parent=287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/categories?post=287"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kedar.nitty-witty.com\/blog\/wp-json\/wp\/v2\/tags?post=287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}