LoginSignup
2
2

More than 5 years have passed since last update.

SQLをコマンドラインから実行

Posted at
insert_user_data.sql
delete from users;
INSERT INTO  users(first_name, last_name, age) values
('田中', '太郎', '40'),
('田中', '太郎', '40'),
('田中', '太郎', '40');

以下で実行する。

PostgreSQLの場合

psql -U ユーザー名 DB名 -f 実行するファイル名

MySQLの場合

mysql [DB名] < 実行するファイル名
2
2
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
2
2