「Postresql入門」SELECT MAX(CAST(XXX)である項目最大値を取得する

SQL構文
SELECT
MAX (CAST(SUBSTRING(EMPID, 8, 3) AS NUMERIC (3)))
FROM
TEST_TBL
WHERE
EMPID = ‘xxxx’

Comments are closed.