RHEL8 SQLite3をインストールする

環境
Red Hat Enterprise Linux release 8.6 (Ootpa)

操作方法
1.アップデートを行います。
sudo dnf update

2.SQLiteインストールを行います
sudo dnf install sqlite

3.バージョンを確認します。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sqlite3 -version
sqlite3 -version
sqlite3 -version

4.sample.dbを作成します
sqlite3 sample.db

テーブル作成を行います

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
sqlite> create table test(
...> uid int(3),
...> name varchar(20)
...> );
sqlite> create table test( ...> uid int(3), ...> name varchar(20) ...> );
sqlite> create table test(
...> uid int(3),
...> name varchar(20)
...> );

 

データをインサートします
sqlite> INSERT INTO test(uid,name) VALUES(1,’ssss’);

データがインサートされたことを確認します
sqlite> SELECT * FROM test;

抜けます
sqlite> .exit

IT

Posted by arkgame