{"id":933,"date":"2021-09-14T15:56:07","date_gmt":"2021-09-14T19:56:07","guid":{"rendered":"https:\/\/folvera.commons.gc.cuny.edu\/?p=933"},"modified":"2021-09-16T14:57:18","modified_gmt":"2021-09-16T18:57:18","slug":"cuny-ace-upskilling-introduction-to-structured-query-language-sf21job-day-6","status":"publish","type":"post","link":"https:\/\/folvera.commons.gc.cuny.edu\/?p=933","title":{"rendered":"CUNY ACE Upskilling: Introduction to Structured Query Language (SF21JOB) \u2014 Day 6"},"content":{"rendered":"<p>We are half-way done with the course. We are now creating, dropping and altering objects.<\/p>\n<pre><span style=\"color: #0000ff\">    CREATE<\/span>  obj_type   obj_name [some_code]\r\n\r\n    <span style=\"color: #0000ff\">CREATE  DATABASE<\/span>   db_name;\r\n\r\n    <span style=\"color: #0000ff\">CREATE  SCHEMA<\/span>     schema_name;\r\n\r\n    <span style=\"color: #0000ff\">CREATE  TABLE<\/span>      table_name;\r\n      (\r\n        field_1 datatype_1 [atributes],\r\n        field_2 datatype_2 [atributes],\r\n        field_3 datatype_3 [atributes],\r\n        ...\r\n      );\r\n\r\n    <span style=\"color: #0000ff\">CREATE  VIEW<\/span>       view_table\r\n    AS\r\n      (\r\n        <span style=\"color: #0000ff\">SELECT<\/span> fields...\r\n        <span style=\"color: #0000ff\">FROM<\/span> table(s)\r\n      );\r\n<\/pre>\n<p>Download the\u00a0<a title=\"Class Notes for SF21JOB - Day 6 (2021\/09\/13)\" href=\"https:\/\/folvera.commons.gc.cuny.edu\/wp-content\/blogs.dir\/2501\/files\/2021\/09\/SF21JOB_20210913.pdf\">class notes<\/a> for day 6.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We are half-way done with the course. We are now creating, dropping and altering objects. CREATE obj_type obj_name [some_code] CREATE DATABASE db_name; CREATE SCHEMA schema_name; CREATE TABLE table_name; ( field_1 datatype_1 [atributes], field_2 datatype_2 [atributes], field_3 datatype_3 [atributes], &#8230; ); CREATE VIEW view_table AS ( SELECT fields&#8230; FROM table(s) ); Download the\u00a0class notes for day [&hellip;]<\/p>\n","protected":false},"author":7213,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"send_to_group_blog":0,"footnotes":""},"categories":[28,3,1,17,2],"tags":[],"class_list":["post-933","post","type-post","status-publish","format-standard","hentry","category-sf21job","category-computer-programming","category-cuny","category-open-source","category-sql"],"_links":{"self":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/933","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/users\/7213"}],"replies":[{"embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=933"}],"version-history":[{"count":3,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/933\/revisions"}],"predecessor-version":[{"id":945,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/933\/revisions\/945"}],"wp:attachment":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=933"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=933"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=933"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}