0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【SQL】データベースの作成と削除(CREATE DATABASE / DROP DATABASE)

Last updated at Posted at 2025-03-30

名前を指定してデータベースを作成する

名前を指定してデータベースを作成する
CREATE DATABASE [データベース名];

・データベース名を最初に付ける必要がある。
・原則として後から変えることは出来ない。

そのほかのデータベース作成時に指定出来る主な項目
・キャラクタセット
・データのパス
・最大ファイルサイズ
・表領域自動拡張の有無

データベースを削除する

データベースを削除する
DROP DATABASE [データベース名];

(Oracleの場合、データベース名の指定は不要)

データベースを削除すると、テーブルやデータも削除される。

おわりに

ここまで読んでいただきありがとうございます!

参考文献

・図解 SQL これからはじめる基本の知識 (知りたい!テクノロジー) 単行本(ソフトカバー) – 2010/12/11
島田 裕二 (著)
p.66-67

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?