{"id":335,"date":"2020-12-07T14:35:43","date_gmt":"2020-12-07T09:05:43","guid":{"rendered":"http:\/\/sumitjangid.com\/?p=335"},"modified":"2020-12-07T14:35:43","modified_gmt":"2020-12-07T09:05:43","slug":"views","status":"publish","type":"post","link":"http:\/\/sumitjangid.com\/index.php\/2020\/12\/07\/views\/","title":{"rendered":"Views"},"content":{"rendered":"\n<p>where ever we use a select statement we get some kind of resultset. in order to save our time sql provides a functionality to save such queries as views so Views are basically stored queries. <\/p>\n\n\n\n<p>Views has many advantages:<\/p>\n\n\n\n<ol><li>Save time as we don&#8217;t have to write the same queries again and again<\/li><li>It helps to have a better security view as we can restrict the direct access to certain users and we can give access to the views which they require<\/li><li>Views can hide the structure of the tables. <\/li><\/ol>\n\n\n\n<p>How to create a new view:<\/p>\n\n\n\n<ol><li>Create view &lt;Viewname><\/li><li>as<\/li><li>select * from &lt;TableName><\/li><\/ol>\n\n\n\n<p>how to access view:<\/p>\n\n\n\n<ol><li>select * from &lt;ViewName><\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>where ever we use a select statement we get some kind of resultset. in order to save our time sql provides a functionality to save such queries as views so Views are basically stored queries.&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\/335"}],"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=335"}],"version-history":[{"count":1,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/posts\/335\/revisions"}],"predecessor-version":[{"id":336,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/posts\/335\/revisions\/336"}],"wp:attachment":[{"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/media?parent=335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/categories?post=335"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sumitjangid.com\/index.php\/wp-json\/wp\/v2\/tags?post=335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}