0
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[MySQL] MySQLでデータベースを作成

Posted at

#データベースを作成し値を入力する

※ 自分用の覚え書きでございます。

・db_users というデータベースを作成します
・tbl_users というテーブルを作成します
・値を INSERT します

mysql> CREATE DATABASE db_users;

mysql> USE db_users;

mysql> CREATE TABLE tbl_users (id INT AUTO_INCREMENT, name TEXT, age INT(3) , PRIMARY KEY (id)) DEFAULT CHARSET=utf8;

mysql> INSERT INTO tbl_users (name, age) VALUES ('山田太郎', 15);

SELECT * FROM tbl_users; で以下のように表示されます。
006a.png

0
3
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
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?