CentOS7

SQLコマンド

ログイン

[root@localhost ~]# mysql -u ユーザー名 -p

データベース一覧を確認する

MariaDB [(none)]> show databases;

データベースを作成する

MariaDB [(none)]> create databases データベース名;

データベースを削除する

MariaDB [(none)]> drop databases データベース名;

データベースを選択

MariaDB [(none)]> use データベース名;

テーブル内のレコードを検索する

MariaDB [(database)]> select * from テーブル名;
MariaDB [(database)]> select * from テーブル名 where id=10; ←idが10のレコードだけを抽出

トップ   編集 凍結 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS
Last-modified: 2019-11-18 (月) 17:27:45