PostgreSQL upperメソッド小文字から大文字に変換するサンプル

環境
Windows 10 Home 64bit
PostgreSQL 13.2

構文
upper( 変換する文字列 )
小文字から大文字へ変換します。
小文字から大文字に変換するにはupperを使用します。
SQL構文
select upper('study’);
実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# select upper('study');
upper
-------
STUDY
(1)
postgres=# select upper('study'); upper ------- STUDY (1 行)
postgres=# select upper('study');
 upper
-------
 STUDY
(1 行)

使用例2
SQL構文
select upper('stuDy’) result;
実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# select upper('stuDy') result;
result
--------
STUDY
(1)
postgres=# select upper('stuDy') result; result -------- STUDY (1 行)
postgres=# select upper('stuDy') result;
 result
--------
 STUDY
(1 行)

使用例3
SQL構文
select upper('s t u d y’);
実行結果

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# select upper('s t u d y');
upper
-----------
S T U D Y
(1)
postgres=# select upper('s t u d y'); upper ----------- S T U D Y (1 行)
postgres=# select upper('s t u d y');
   upper
-----------
 S T U D Y
(1 行)

 

PostgreSQL

Posted by arkgame