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?

More than 5 years have passed since last update.

MySQL(MariaDB)にログイン

Posted at

XAMPPのコントロール・パネル(アプリケーション・マネジャー)

から「shell」を選択。

→コマンド・プロンプトのような(黒い)画面が

 開きますので、「mysql」と入力。MySQLが起動。

→抜ける(終了する)時は「quit」もしくは「exit」と入力。

・データベース作成
 create database データベース名;

・データベース一覧表示
 show databases;

・テーブル作成
 create table テーブル名 (カラム名 データ型,カラム名 データ型,‥);

・テーブル一覧表示
 show tables;

・テーブルへのデータの挿入
 1、insert into テーブル名 (カラム名, カラム名) values (値, 値);

 2、すべてのカラムに値を指定してデータを追加する場合はカラム名の指定を省略可
   insert into テーブル名 values (値,値,値,‥);
 
・テーブルデータの表示
 1、select カラム名, カラム名,カラム名 from テーブル名;

 2、すべてのカラムの値を取得する
   select * from テーブル名;

◆参考にしたサイト
データベース作成
https://www.dbonline.jp/mysql/database/
データベース一覧表示
https://www.dbonline.jp/mysql/database/index2.html
テーブル作成
https://www.dbonline.jp/mysql/table/
テーブル一覧表示
https://www.dbonline.jp/mysql/table/index2.html
テーブルへのデータの挿入
https://www.dbonline.jp/mysql/insert/index1.html
テーブルデータの表示
https://www.dbonline.jp/mysql/select/index1.html

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?