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?

【MySQL】テーブル作成方法

0
Posted at

はじめに

データベースの作成忘れるのでまとめました

データベース作成

CREATE DATABASE testdb;

データベース一覧表示

SHOW DATABASES;

削除

DROP DATABASE testdb;

テーブル作成

データベースの選択

USE testdb;

使用中のデータベースの確認

SELECT DATABASE();

テーブル作成

この表のように設定してみます
image.png

CREATE TABLE testTable(
    id CHAR(8) NOT NULL PRIMARY KEY,
    mail TEXT NOT NULL,
    name TEXT NOT NULL
);

テーブル内容の確認

desc testTable;

image.png

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?