sqlite3 maxでテーブルのカラムの最大値を取得する

環境
Windows 10 Home 64bit
SQLite 3.39.2

書式
max(カラム名)
max関数を使ってテーブルのカラムの最大値を取得します

使用例
テーブル「usertbl」というテーブルのカラム「age」の最大値を取得します

SQL構文

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
select max(age) from usertbl;
select max(age) from usertbl;
select max(age) from usertbl;

 

SQLite

Posted by arkgame