{"id":93,"date":"2018-12-05T16:28:21","date_gmt":"2018-12-05T16:28:21","guid":{"rendered":"https:\/\/barkhane.com\/sql\/2018\/12\/05\/sql-create-database\/"},"modified":"2024-03-03T18:04:56","modified_gmt":"2024-03-03T18:04:56","slug":"sql-create-database","status":"publish","type":"post","link":"https:\/\/barkhane.com\/sql\/sql-create-database\/","title":{"rendered":"SQL CREATE Database"},"content":{"rendered":"<p>The SQL\u00a0<b>CREATE DATABASE<\/b>\u00a0statement is used to create a new SQL <a href=\"https:\/\/barkhane.com\/sql\/what-is-database\/\">database<\/a>.<\/p>\n<h2>Syntax<\/h2>\n<p>The basic syntax of this CREATE DATABASE statement is as follows \u2212<\/p>\n<pre class=\"result notranslate\">CREATE DATABASE DatabaseName;\n<\/pre>\n<p>Always the database name should be unique within the RDBMS.<\/p>\n<h2>CREATE DATABASE Example<\/h2>\n<p>The following SQL statement creates a database called \\&#8221;NewDB\\&#8221;:<\/p>\n<div class=\"w3-example\">\n<b>Example<\/b><\/p>\n<div class=\"w3-code notranslate sqlHigh\"><code><\/p>\n<pre>CREATE\u00a0DATABASE\u00a0NewDB;<\/pre>\n<p><\/code><\/div>\n<\/div>\n<div><\/div>\n<div><strong>Make sure you have the admin privilege before creating any database. Once a database is created, you can check it in the list of databases<\/strong><\/div>\n","protected":false},"excerpt":{"rendered":"<p>The SQL\u00a0CREATE DATABASE\u00a0statement is used to create a new SQL database. Syntax The basic syntax of this CREATE DATABASE statement [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"class_list":["post-93","post","type-post","status-publish","format-standard","hentry","category-sql"],"_links":{"self":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/posts\/93","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/comments?post=93"}],"version-history":[{"count":0,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/posts\/93\/revisions"}],"wp:attachment":[{"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/media?parent=93"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/categories?post=93"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/barkhane.com\/sql\/wp-json\/wp\/v2\/tags?post=93"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}