{"id":674,"date":"2018-06-12T10:37:23","date_gmt":"2018-06-12T14:37:23","guid":{"rendered":"https:\/\/folvera.commons.gc.cuny.edu\/?p=674"},"modified":"2021-09-16T14:57:50","modified_gmt":"2021-09-16T18:57:50","slug":"database-administration-fundamentals-ws18sql1002-day-6","status":"publish","type":"post","link":"https:\/\/folvera.commons.gc.cuny.edu\/?p=674","title":{"rendered":"Database Administration Fundamentals (WS18SQL1002) \u2013 Day 6"},"content":{"rendered":"<p>We have started to <tt>CREATE<\/tt> database objects.<\/p>\n<pre>  CREATE object_type object_name\r\n  [AS structure]\r\n<\/pre>\n<p>So far we are making (<tt>CREATE<\/tt>),<\/p>\n<pre>  CREATE TABLE table_name\r\n  (\r\n    field1 datatype [null|not null] [unique] [primary key],\r\n    field2 datatype [null|not null],\r\n    ...\r\n  )\r\n<\/pre>\n<p>modifying (<tt>ALTER<\/tt>)<\/p>\n<pre>  ALTER TABLE table_name\r\n  ADD|DROP|ALTER COLUMN field_name datatype\r\n<\/pre>\n<p>and destroying (<tt>DROP<\/tt>) tables.<\/p>\n<pre>  DROP TABLE table_name\r\n<\/pre>\n<p>Download the\u00a0<a title=\"Class Notes for WS18SQL1002 - Day 6 (2018\/06\/11)\" href=\"https:\/\/folvera.commons.gc.cuny.edu\/wp-content\/blogs.dir\/2501\/files\/2018\/06\/WS18SQL1002_20180611.pdf\">class notes<\/a>\u00a0for day 6.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We have started to CREATE database objects. CREATE object_type object_name [AS structure] So far we are making (CREATE), CREATE TABLE table_name ( field1 datatype [null|not null] [unique] [primary key], field2 datatype [null|not null], &#8230; ) modifying (ALTER) ALTER TABLE table_name ADD|DROP|ALTER COLUMN field_name datatype and destroying (DROP) tables. DROP TABLE table_name Download the\u00a0class notes\u00a0for 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":[22,3,1,17,2],"tags":[],"class_list":["post-674","post","type-post","status-publish","format-standard","hentry","category-ws18sql1002","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\/674","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=674"}],"version-history":[{"count":1,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/674\/revisions"}],"predecessor-version":[{"id":676,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=\/wp\/v2\/posts\/674\/revisions\/676"}],"wp:attachment":[{"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/folvera.commons.gc.cuny.edu\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}