{"id":344,"date":"2020-12-07T15:58:01","date_gmt":"2020-12-07T10:28:01","guid":{"rendered":"http:\/\/sumitjangid.com\/?p=344"},"modified":"2020-12-07T18:08:21","modified_gmt":"2020-12-07T12:38:21","slug":"stored-procedures","status":"publish","type":"post","link":"http:\/\/sumitjangid.com\/index.php\/2020\/12\/07\/stored-procedures\/","title":{"rendered":"Stored Procedures"},"content":{"rendered":"\n<p>Stored procedures are basically a list of sql statement that needs to be executed. it works a function in our programming languages. Like you create a function and call it when ever you want. <\/p>\n\n\n\n<p>So the stored procedures has the following advantages:<\/p>\n\n\n\n<ol><li>Performance: stored procedures are complied the first time and then saved in the executable format so whenever you execute them, it gets executed quickly. <\/li><li>It improved the response time as a group of instructions are executed in one call.<\/li><li>Other thing is Sql server will execute instructions faster than the client side so you can use this feature to save time.  <\/li><\/ol>\n\n\n\n<p>in order to create a stored procedure use the following command:<\/p>\n\n\n\n<p>create procedure &lt;Procedure name><\/p>\n\n\n\n<p>as <\/p>\n\n\n\n<p>&lt;statements><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>to execute the procedure use:<\/p>\n\n\n\n<p>exec\/execute &lt;procedure name>;<\/p>\n\n\n\n<p>to delete a procedure:<\/p>\n\n\n\n<p><strong>drop procedure\/proc &lt;procedure name>;<\/strong><\/p>\n\n\n\n<p>Parameters in Stored Procedures:<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Stored procedures are basically a list of sql statement that needs to be executed. it works a function in our programming languages. Like you create a function and call it when ever you want. So&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[18],"tags":[],"_links":{"self":[{"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/posts\/344"}],"collection":[{"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/comments?post=344"}],"version-history":[{"count":4,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions"}],"predecessor-version":[{"id":348,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/posts\/344\/revisions\/348"}],"wp:attachment":[{"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/media?parent=344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/categories?post=344"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/tags?post=344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}