このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。 |
(米)棚上げする/(英)提議する of Contents
HyperSQL supports a wide 範囲 of built-in 機能(する)/行事s and 許すs 使用者-defined 機能(する)/行事s written in SQL and Java languages. 使用者-defined 機能(する)/行事s are covered in the SQL-Invoked 決まりきった仕事s 一時期/支部. If a built-in 機能(する)/行事 is not 利用できる, you can 令状 your own using procedural SQL or Java.
Built-in aggregate 機能(する)/行事s such as SUM,
MAX
, ARRAY_AGG
,
GROUP_CONCAT
are covered in the Data 接近 and Change 一時期/支部, which
covers SQL in general. SQL 表現s such as
COALESCE
, NULLIF
and
CAST
are also discussed there.
The built-in 機能(する)/行事s 落ちる into three groups:
SQL 基準 機能(する)/行事s
A wide 範囲 of 機能(する)/行事s defined by SQL/創立/基礎 are supported. SQL/創立/基礎 機能(する)/行事s that have no parameter are called without empty parentheses. 機能(する)/行事s with 多重の parameters often use keywords instead of commas to separate the parameters. Many 機能(する)/行事s are 積みすぎる. の中で these, some have one or more optional parameters that can be omitted, while the return type of some 機能(する)/行事s is 扶養家族 upon the type of one of the parameters. The usage of SQL 基準 機能(する)/行事s (where they can be used) is covered more extensively in the Data 接近 and Change 一時期/支部
JDBC Open Group CLI 機能(する)/行事s
These 機能(する)/行事s were defined as an 拡張 to the CLI
基準, which is the basis for ODBC and JDBC and supported by many
database 製品s. JDBC supports an escape 機械装置 to 明示する
機能(する)/行事 calls in SQL 声明s in a manner that is 独立した・無所属 of
the 機能(する)/行事 指名するs supported by the 的 database engine. For
example SELECT {fn DAYOFMONTH (dateColumn)} FROM
myTable
can be used in JDBC and is translated to 基準
SQL as SELECT EXTRACT (DAY_OF_MONTH FROM dateColumn) FROM
myTable
if a database engine supports the 基準 syntax.
If a database engine does not support 基準 SQL, then the
translation will be different. HyperSQL supports all the 機能(する)/行事
指名するs 明示するd in the JDBC specifications as native 機能(する)/行事s.
Therefore, there is no need to use the {fn FUNC_NAME ( ...
) }
escape with HyperSQL. If a JDBC 機能(する)/行事 is supported
by the SQL 基準 in a different form, the SQL 基準 form is
the preferred form to use.
HyperSQL Built-In 機能(する)/行事s
Many 付加 built-in 機能(する)/行事s are 利用できる for some useful 操作/手術s. Some of these 機能(する)/行事s return the 現在の setting for the 開会/開廷/会期 and the database. The General 機能(する)/行事s 受託する arguments of different types and return values based on comparison between the arguments.
In the BNF specification used here, words in 資本/首都 letters are
actual 記念品s. Syntactic elements such as 表現s are enclosed in
angle brackets. The <left paren>
and
<権利 paren>
記念品s are 代表するd with the
actual symbol. Optional elements are enclosed with square brackets (
<left bracket>
and <権利
bracket>
). 多重の 選択s for a 要求するd element are
enclosed with を締めるs ( <left を締める>
and
<権利 を締める>
).
代案/選択肢
記念品s are separated with the vertical 妨げる/法廷,弁護士業 ( <vertical
妨げる/法廷,弁護士業>
). At the end of each 機能(する)/行事 鮮明度/定義, the 基準
which 明示するs the 機能(する)/行事 is 公式文書,認めるd in parentheses as JDBC or HyperSQL,
or the SQL:2023 基準.
In SQL, there are three 肉親,親類d of string: character, binary and bit.
The 部隊s are それぞれ characters, octets, and bits. Each 肉親,親類d of
string can be in different data types. CHAR, VARCHAR and CLOB are the
character data types. BINARY, VARBINARY and BLOB are the binary data
types. BIT and BIT VARYING are the bit string types. In all string
機能(する)/行事s, the position of a 部隊 of the string within the whole string is
明示するd from 1 to the length of the whole string. In the BNF,
<char value expr>
示すs any valid SQL
表現 that 評価するs to a character type. Likewise,
<binary value expr>
示すs a binary type
and <num value expr>
示すs a numeric
type.
ASCII
ASCII ( <char value expr> )
Returns an INTEGER equal to the ASCII code value of the first
character of <char value expr>
. (JDBC)
ASCIISTR
ASCIISTR ( <char value expr> )
Returns the ASCII 代表 of the string argument with all characters outside the 範囲 32-126 取って代わるd with Unicode escape codes. (HyperSQL)
BIT_LENGTH
BIT_LENGTH ( <string value 表現>
)
BIT_LENGTH can be used with character, binary and bit strings. It return a BIGINT value that 対策 the bit length of the string. (SQL:2023)
See also CHARACTER_LENGTH and OCTET_LENGTH.
CHAR
CHAR ( <UNICODE code> )
The argument is an INTEGER. Returns a character string 含む/封じ込めるing a
選び出す/独身 character that has the 明示するd <UNICODE
code>
, which is an integer. ASCII codes are a subset of the
許すd values for <UNICODE code>
. (JDBC)
CHARACTER_LENGTH
{ CHAR_LENGTH | CHARACTER_LENGTH } ( <char value
表現> [ USING { CHARACTERS | OCTETS } ] )
The CHAR_LENGTH or CHARACTER_LENGTH 機能(する)/行事 can be used with character strings, while OCTET_LENGTH can be used with character or binary strings and BIT_LENGTH can be used with character, binary and bit strings.
All 機能(する)/行事s return a BIGINT value that 対策 the length of the
string in the given 部隊. CHAR_LENGTH counts characters, OCTET_LENGTH
counts octets and BIT_LENGTH counts bits in the string. For CHAR_LENGTH,
if [ USING OCTETS ]
is 明示するd, the octet count is
returned, which is twice the normal length. (SQL:2023)
CONCAT
CONCAT ( <char value expr 1>, <char value expr
2> [, ...] )
CONCAT ( <binary value expr 1>, <binary value expr
2> [, ...] )
The arguments are character strings or binary strings. Returns a
string formed by concatenation of the arguments. 最小限 number of
arguments is 2. 同等(の) to the SQL concatenation 表現
<value expr 1> || <value expr 2> [ || ...]
.
扱うing of null values in the CONCAT 機能(する)/行事 depends on the
database 所有物/資産/財産 sql.concat_nulls
( SET
DATABASE SQL SYNTAX CONCAT NULLS { TRUE || FALSE }
). By
default, any null value will 原因(となる) the 機能(する)/行事 to return null. If the
所有物/資産/財産 is 始める,決める 誤った, then NULL values are 取って代わるd with empty
strings.
(JDBC)
CONCAT_WS
CONCAT_WS ( <char value separator>, <char value
expr 1>, <char value expr 2> [, ...] )
The arguments are character strings. Returns a string formed by
concatenation of the arguments from the second argument, using the
separator from the first argument. 最小限 number of arguments is 3.
同等(の) to the SQL concatenation 表現 <value expr
1> || <separator> || <value expr 2> [ || ...]
.
The 機能(する)/行事 ignores null values and returns an empty string if all values
are null. It returns null only if the separator is null.
This 機能(する)/行事 is 類似の to a MySQL 機能(する)/行事 of the same 指名する.
(HyperSQL)
DIFFERENCE
DIFFERENCE ( <char value expr 1>, <char value expr
2> )
The arguments are character strings. 変えるs the arguments into SOUNDEX codes, and returns an INTEGER between 0-4 which 示すs how 類似の the two SOUNDEX value are. If the values are the same, it returns 4, if the values have no similarity, it returns 0. In-between values are returned for 部分的な/不平等な similarity. (JDBC)
FROM_BASE64
FROM_BASE64( <character value expr>
)
Returns a binary string by 変えるing from the base64
<character value expr>
. (HyperSQL)
INSERT
INSERT ( <char value expr 1>, <相殺する>,
<length>, <char value expr 2> )
Returns a character string based on <char value expr
1>
in which <length>
characters have
been 除去するd from the <相殺する>
position and in
their place, the whole <char value expr 2>
is
copied. 同等(の) to SQL/創立/基礎 OVERLAY( <char value
expr1> PLACING < char value expr2> FROM <相殺する> FOR
<length> )
. (JDBC)
INSTR
INSTR ( <char value expr 1>, <char value expr
2> [ , <相殺する> ] )
Returns as a BIGINT value the starting position of the first
occurrence of <char value expr 2>
within
<char value expr 1>
. If
<相殺する
> is 明示するd, the search begins with the
position 示すd by <相殺する>
. If the search is
not successful, 0 is returned. 類似の to the LOCATE
機能(する)/行事 but the order of the arguments is 逆転するd. (HyperSQL)
HEX
HEX( <binary value expr> )
HEX( <numeric value expr> )
Returns a character string of hexadecimal digits and letters
代表するing the <binary value expr>
. 正確に/まさに the
same as the RAWTOHEX
機能(する)/行事. With
<numeric value expr>
the hexadecimal digits
代表する the number in base 16 (HyperSQL)
HEXTORAW
HEXTORAW( <char value expr> )
Returns a binary string formed by translation of hexadecimal digits
and letters in the <char value expr>
. Each
character of the <char value expr>
must be a
digit or a letter in the A | B | C | D | E | F 始める,決める. Each byte of the
retired binary string is formed by translating two hex digits into one
byte. (HyperSQL)
LCASE
LCASE ( <char value expr> )
Returns a character string that is the lower-事例/患者 見解/翻訳/版 of the
<char value expr>
. 同等(の) to SQL/創立/基礎
LOWER (<char value expr>)
. (JDBC)
LEFT
LEFT ( <char value expr>, <count> )
Returns a character string consisting of the first
<count>
characters of <char value
expr>
. 同等(の) to SQL/創立/基礎
SUBSTRING(<char value expr> FROM 0 FOR <count>)
.
(JDBC)
LENGTH
LENGTH ( <char value expr> )
Returns as a BIGINT value the number of characters in
<char value expr>
. 同等(の) to SQL/創立/基礎
CHAR_LENGTH(<char value expr>)
. (JDBC)
LOCATE
LOCATE ( <char value expr 1>, <char value expr
2> [ , <相殺する> ] )
Returns as a BIGINT value the starting position of the first
occurrence of <char value expr 1>
within
<char value expr 2>
. If
<相殺する
> is 明示するd, the search begins with the
position 示すd by <相殺する>
. If the search is
not successful, 0 is returned. Without the third argument,
LOCATE
is 同等(の) to the SQL 基準 機能(する)/行事
POSITION(<char value expr 1> IN <char value expr
2>)
. (JDBC)
LOWER
LOWER ( <char value expr> )
Returns a character string that is the lower-事例/患者 見解/翻訳/版 of the
<char value expr>
. (SQL:2023)
LPAD
LPAD ( <char value expr 1>, <length> [,
<char value expr 2> ] )
Returns a character string with the length of
<length>
characters. The string 含む/封じ込めるs the
characters of <char value expr 1>
padded to the
left with spaces. If <length>
is smaller than the
length of the string argument, the argument is truncated. If the optional
<char value expr 2>
is 明示するd, this string is
used for padding, instead of spaces. (SQL:2023)
LTRIM
LTRIM ( <char value expr 1> [, <char value expr
2> ] )
When called with a 選び出す/独身 argument, returns a character string based
on <char value expr 1>
with the 主要な space
characters 除去するd. 同等(の) to SQL/創立/基礎 TRIM( LEADING '
' FROM <char value expr1> )
. When called with two
arguments, <char value expr 2>
代表するs the
主要な character to be 除去するd. (SQL:2023)
OCTET_LENGTH
OCTET_LENGTH ( <string value 表現>
)
The OCTET_LENGTH 機能(する)/行事 can be used with character or binary strings.
Return a BIGINT value that 対策 the length of the string in
octets. When used with character strings
, the octet
count is returned, which is twice the normal length. (SQL:2023)
OVERLAY
OVERLAY ( <char value expr 1> PLACING <char value
expr 2>
FROM <start position> [ FOR <string length> ] [
USING CHARACTERS ] )
OVERLAY ( <binary value expr 1> PLACING <binary
value expr 2>
FROM <start position> [ FOR <string length> ]
)
The character 見解/翻訳/版 of OVERLAY returns a character string based on
<char value expr 1>
in which <string
length>
characters have been 除去するd from the
<start position>
and in their place, the whole
<char value expr 2>
is copied.
The binary 見解/翻訳/版 of OVERLAY returns a binary string formed in the same manner as the character 見解/翻訳/版. (SQL:2023)
POSITION
POSITION ( <char value expr 1> IN <char value expr
2> [ USING CHARACTERS ] )
POSITION ( <binary value expr 1> IN <binary value
expr 2> )
The character and binary 見解/翻訳/版s of POSITION search the string value of the second argument for the first occurrence of the first argument string. If the search is successful, the position in the string is returned as a BIGINT. さもなければ 無 is returned. (SQL:2023)
RAWTOHEX
RAWTOHEX( <binary value expr> )
Returns a character string composed of hexadecimal digits
代表するing the bytes in the <binary value
expr>
. Each byte of the <binary value
expr>
is translated into two hex digits. (HyperSQL)
REGEXP_COUNT
REGEXP_COUNT ( <char value expr>, <正規の/正選手
表現> )
Returns as an INTEGER value the number of 地域s of the
<char value expr>
that match the
<正規の/正選手 表現>
. The <正規の/正選手
表現>
is defined によれば Java language 正規の/正選手
表現 支配するs. Returns 0 if no match is 設立する. (HyperSQL)
REGEXP_INSTR
REGEXP_INSTR ( <char value expr>, <正規の/正選手
表現> )
Returns as an INTEGER value the starting position of the first
地域 of the <char value expr>
that matches the
<正規の/正選手 表現>
. The <正規の/正選手
表現>
is defined によれば Java language 正規の/正選手
表現 支配するs. Returns 0 if no match is 設立する. (HyperSQL)
REGEXP_LIKE
REGEXP_LIKE ( <char value expr>, <正規の/正選手
表現> )
REGEXP_MATCHES
REGEXP_MATCHES ( <char value expr>, <正規の/正選手
表現> )
Both 機能(する)/行事s return true if the <char value
expr>
matches the <正規の/正選手
表現>
as a whole. The <正規の/正選手
表現>
is defined によれば Java language 正規の/正選手
表現 支配するs. (HyperSQL)
REGEXP_REPLACE
REGEXP_REPLACE ( <char value expr>, <正規の/正選手
表現> [, <取って代わる char value expr> [, <start
position> [, <取って代わる count> [, <選択s>]]]] )
取って代わるs <char value expr 1>
地域s that
match the <正規の/正選手 表現>
with
<取って代わる char value expr>
. This last parameter is
optional and defaults to the empty string. The 残り/休憩(する) of the parameters are
also optional. The <start position>
parameter is
not 器具/実施するd and must be 1 if used. The <取って代わる
count>
parameter is 0 by default, which means 取って代わる all
occurrences, or it can be 1, which means 取って代わる only the first
occurrence. The <選択s>
parameter is a string
which can 含む/封じ込める: 'i' for 事例/患者-insensitive compare, 'c' for Unicode 事例/患者,
'n' for the '.' also to match any line terminator, and 'm' for multi-line
matches. The <正規の/正選手 表現>
is defined
によれば Java language 正規の/正選手 表現 支配するs. (HyperSQL)
REGEXP_SUBSTR
REGEXP_SUBSTR ( <char value expr>, <正規の/正選手
表現> )
REGEXP_SUBSTRING
REGEXP_SUBSTRING ( <char value expr>, <正規の/正選手
表現> )
Both 機能(する)/行事s return the first 地域 in the <char
value expr>
that matches the <正規の/正選手
表現>
. The <正規の/正選手
表現>
is defined によれば Java language 正規の/正選手
表現 支配するs. (HyperSQL)
REGEXP_SUBSTRING_ARRAY
REGEXP_SUBSTRING_ARRAY ( <char value expr>,
<正規の/正選手 表現> )
Returns all the 地域s in the <char value
expr>
that match the <正規の/正選手
表現>
. The <正規の/正選手
表現>
is defined によれば Java language 正規の/正選手
表現 支配するs. Returns an array 含む/封じ込めるing the matching 地域s
(HyperSQL)
REPEAT
REPEAT ( <char value expr>, <count> )
Returns a character string based on <char value
expr>
, repeated <count>
times.
(JDBC)
REPLACE
REPLACE ( <char value expr 1>, <char value expr
2> [, <char value expr 3> ] )
Returns a character string based on <char value expr
1>
where each occurrence of <char value expr
2>
has been 取って代わるd with a copy of <char value
expr 3>
. If the 機能(する)/行事 is called with just two arguments,
the <char value expr 3> defaults to the empty string and calling the
機能(する)/行事 簡単に 除去するs the occurrences of <char value expr
2>
from the first string.(JDBC)
REVERSE
REVERSE ( <char value expr> )
Returns a character string based on <char value
expr>
with characters in the 逆転する order. (HyperSQL)
RIGHT
RIGHT ( <char value expr>, <count> )
Returns a character string consisting of the last
<count>
characters of <char value
expr>
. (JDBC)
RPAD
RPAD ( <char value expr 1>, <length> [,
<char value expr 2> ] )
Returns a character string with the length of
<length>
characters. The string begins with the
characters of <char value expr 1>
padded to the
権利 with spaces. If <length>
is smaller than
the length of the string argument, the argument is truncated. If the
optional <char value expr 2>
is 明示するd, this
string is used for padding, instead of spaces. (SQL:2023)
RTRIM
RTRIM ( <char value expr 1> [, <char value expr
2> ] )
When called with a 選び出す/独身 argument, returns a character string based
on <char value expr 1>
with the 追跡するing space
characters 除去するd. 同等(の) to SQL/創立/基礎 TRIM(TRAILING '
' FROM <character string>)
. When called with two
arguments, <char value expr 2>
代表するs the
追跡するing character to be 除去するd. (SQL:2023)
SOUNDEX
SOUNDEX ( <char value expr> )
Returns a four-character code 代表するing the sound of
<char value expr>
. The US 国勢(人口)調査 algorithm is
used. For example, the soundex value for "Washington" is W252. This
機能(する)/行事 is used for 蓄える/店ing the soundex of 指名するs in a column of a (米)棚上げする/(英)提議する,
then searching this column for strings matching the soundex of the search
string, then comparing the actual 指名するs 蓄える/店d in the database with the
search string. (JDBC)
SPACE
SPACE ( <count> )
Returns a character string consisting of <count>
spaces. (JDBC)
SUBSTR
{ SUBSTR | SUBSTRING } ( <char value expr>,
<相殺する>, <length> )
The JDBC 見解/翻訳/版 of SQL/創立/基礎 SUBSTRING
returns a character string that consists of
<length>
characters from <char value
expr>
starting at the <相殺する>
position. (JDBC)
SUBSTRING
SUBSTRING ( <char value expr> FROM <start
position> [ FOR <string length> ] [ USING CHARACTERS ]
)
SUBSTRING ( <binary value expr> FROM <start
position> [ FOR <string length> ] )
The character 見解/翻訳/版 of SUBSTRING returns a character string that
consists of the characters of the <char value expr>
from <start position>
. If the
optional <string length>
is 明示するd, only
<string length>
characters are returned.
The binary 見解/翻訳/版 of SUBSTRING returns a binary string in the same manner. (SQL:2023)
TO_BASE64
TO_BASE64( <binary value expr> )
Returns a character string as a base 64 代表 of the bytes
in the <binary value expr>
. (HyperSQL)
TO_CHAR
TO_CHAR ( <Numeric value expr>, <char value
expr> )
This 機能(する)/行事 変えるs a numeric value to a character string using the 判型 given in the second argument. In the 判型 template, the digits 0 and 9 are used for the digits of the numeric value. If the numeric value has more 重要な digits than the template, the hash symbol (#) is returned as the result. By default, the result has the minus 調印する at the beginning when the numeric value is 消極的な, or a space when it is 肯定的な. The special 判型 element B can be used at the beginning of the 判型 template to return a blank string when the numeric value is 無. The special 判型 element MI can be used at the end of the 判型 template for a minus 調印する for 消極的な numeric values or a space for 肯定的な values. The special 判型 element S can be used at the beginning or end of the template for a 加える or minus 調印する to be 含むd for all numeric values at that position. Alternatively, the 判型 element PR can be used once at the end of the 判型 string for angle brackets around the 消極的な results. Numeric values of type DOUBLE are first 変えるd to DECIMAL with the same 規模 as 示すd in the template. (HyperSQL)
(米)棚上げする/(英)提議する 4.1. TO_CHAR (number) 判型 elements
9 | The digit 9 means a space is used in the result when no digit is 現在の. さもなければ the digit from the numeric value. |
0 |
The digit 0 means the 無 digit is used in the result when no digit is 現在の. さもなければ the digit from the numeric value. |
B |
A blank string is returned if the numeric value is 無. |
FM |
除去するs the 初期の spaces in the result. |
MI |
Space or minus 調印する at the end of the sequence of digits. |
S |
加える or minus 調印する at the beginning or end of the sequence of digits. |
PR |
Angle brackets around the result are used for 消極的な values. |
. |
The period character. Used for the decimal point. |
, |
The comma character. Used for 配合 digits. |
TO_CHAR ( 1234567.890, '999,999,999.999' ) 1,234,567.890 TO_CHAR ( 1234567.890, '000,999,999.999' ) 001,234,567.890
TRIM
TRIM ([ [ LEADING | TRAILING | BOTH ] [ <削減する
character> ] FROM ] <char value expr> )
TRIM ([ [ LEADING | TRAILING | BOTH ] [ <削減する octet>
] FROM ] <binary value expr> )
The character 見解/翻訳/版 of TRIM returns a character string based on
<char value expr>
. 連続した instances of
<削減する character>
are 除去するd from the beginning,
the end or both ends of the<char value expr>
depending on the value of the optional first qualifier
[ LEADING | TRAILING | BOTH ]
. If no qualifier is
明示するd, BOTH
is used as default. If [
<削減する character> ]
is not 明示するd, the space character
is used as default.
The binary 見解/翻訳/版 of TRIM returns a binary string based on
<binary value expr>
. 連続した instances of
<削減する octet>
are 除去するd in the same manner as in
the character 見解/翻訳/版. If [ <削減する octet> ]
is not
明示するd, the 0 octet is used as default. (SQL:2023)
TRANSLATE
TRANSLATE( <char value expr1>, <char value
expr2>, <char value expr3> )
Returns a character string based on <char value
expr1>
source. Each character of the source is checked
against the characters in <char value expr2>
. If
the character is not 設立する, it is not 修正するd. If the character is 設立する,
then the character in the same position in <char value
expr3>
is used. If <char value
expr2>
is longer than <char value
expr3>
, then those characters at the end that have no
相当するもの in <char value expr3>
are dropped
from the result. (HyperSQL)
-- in this example any accented character in acolumn is 取って代わるd with one without an accent TRANSLATE( acolumn, 'ÁÇÉÍÓÚÀÈÌÒÙÂÊÎÔÛÃÕËÜáçéíóúàèìòùâêîôûãõëü', 'ACEIOUAEIOUAEIOUAOEUaceiouaeiouaeiouaoeu');
UCASE
UCASE ( <char value expr> )
Returns a character string that is the upper 事例/患者 見解/翻訳/版 of the
<char value expr>
. 同等(の) to SQL/創立/基礎
UPPER( <char value expr> )
. (JDBC)
UPPER
UPPER ( <char value expr> )
Returns a character string that is the upper 事例/患者 見解/翻訳/版 of the
<char value expr>
. (SQL:2023)
UNHEX
UNHEX( <char value expr> )
Returns a binary string formed by translation of hexadecimal digits
and letters in the <char value expr>
. 正確に/まさに the
same as the HEXTORAW
機能(する)/行事. (HyperSQL)
UNISTR
UNISTR( <char value expr> )
Returns a string formed by translation of hexadecimal escape
sequences in the <char value expr>
to UTF-16
characters. 正確に/まさに the opposite of ASCIISTR
機能(する)/行事.
(HyperSQL)
JSON 建設者 機能(する)/行事s 変える SQL data into JSON values, These 機能(する)/行事s are supported by HyperSQL によれば the SQL:2023 基準. Each 機能(する)/行事 returns a JSON 反対する or JSON array as a string. The 判型 適合するs to the IETF rfc:7159 文書, The JavaScript 反対する Notation (JSON) Data 交換 判型.
In the BNF, <JSON value expr>
示すs any
valid SQL 表現 that 評価するs to a 選び出す/独身 value. This 含むs
strings, numbers and booleans. Binary values are 代表するd as
hexadecimal strings. All other types, 含むing dates and timestamps, are
代表するd as strings. An optional FORMAT JSON
is used
when the result of the value 表現 is already a string in the JSON
判型.
<JSON value expr> ::= <value 表現> [
FORMAT JSON ]
The optional <JSON 建設者 null 条項>
示すs whether NULL values are 代表するd as JSON nulls or are omitted
from the result. The default behaviour is ABSENT ON
NULL
for JSON_ARRAY
, and NULL ON
NULL
for JSON_OBJECT
.
<JSON null 条項> ::= NULL ON NULL | ABSENT ON
NULL
The optional <JSON 生産(高) 条項>
許すs
you to change the 最大限 length of the returned string from the default
32K bytes.
<JSON 生産(高) 条項> ::= RETURNING
VARCHAR(N)
JSON 機能(する)/行事 calls can be nested to 建設する more コンビナート/複合体 反対するs 含む/封じ込めるing arrays, 反対するs, and arrays of 反対するs.
JSON_ARRAY
JSON_ARRAY ( <JSON value expr>, ... [<JSON null
caluse>] [<JSON 生産(高) caluse>])
The first form of JSON_ARRAY
is a variable
argument 機能(する)/行事, It 変えるs the values from a 一連の value
表現 into a 選び出す/独身 JSON array.
JSON_ARRAY ( <query 表現> [ FORMAT JSON ]
[<JSON null caluse>] [<JSON 生産(高) caluse>])
The second form of JSON_ARRAY
変えるs the values
from a 選び出す/独身 <query 表現> into a JSON array.
(SQL:2023)
-- a JSON array is 建設するd from a 選び出す/独身 列/漕ぐ/騒動 of the (米)棚上げする/(英)提議する SELECT JSON_ARRAY( country_id , 指名する, local_name ) FROM places.countries WHERE country_id = 'ESP' C1 ------------------------ ["ESP","Spain","España"] -- a JSON array is 建設するd from all 列/漕ぐ/騒動s of the (米)棚上げする/(英)提議する VALUES JSON_ARRAY(SELECT 指名する FROM countries) C1 --------------------------------------------------------------------- ["Austria","Switzerland","Germany","Spain","フラン","Italy","Sweden"]
JSON_ARRAYAGG
JSON_ARRAYAGG ( <JSON value expr> [<order by
条項>] [<JSON null caluse>] )
JSON_ARRAYAGG
is an aggregate 機能(する)/行事 類似の to
the ARRAY_AGG
SQL 機能(する)/行事, It 評価するs a value
表現 over a 一連の 列/漕ぐ/騒動s and 連合させるs the values, separated by
commas, into a 選び出す/独身 JSON array. Returns a JSON string. (SQL:2023)
-- a JSON array is 建設するd from all 列/漕ぐ/騒動s of the (米)棚上げする/(英)提議する SELECT JSON_ARRAYAGG( country_id ) FROM places.countries C1 ------------------------------------------- ["AUT","CHE","DEU","ESP","FRA","ITA","SWE"]
JSON_OBJECT
JSON_OBJECT ( <JSON 指名する and value>, ... [<JSON
null caluse>] [ { WITH | WITHOUT } UNIQUE [ KEYS] ] )
JSON_OBJECT
is a variable argument 機能(する)/行事, It
連合させるs a 一連の 重要なs and values into a 選び出す/独身 JSON 反対する. Returns a
JSON string.
There are two supported syntax forms for 重要な:value pairs.
<JSON 指名する and value> ::= <JSON 指名する>
<結腸> <JSON value 表現> | [ KEY ] <JSON 指名する>
VALUE <JSON value 表現>
The optional WITH UNIQUE KEYS
条項 軍隊s an
error if the 重要なs within the JSON 反対する are not unique. The default is
WITHOUT UNIQUE KEYS
. (SQL:2023)
-- a JSON 反対する is 建設するd from each 列/漕ぐ/騒動 of the (米)棚上げする/(英)提議する; both syntax 選択s are shown SELECT country_id, JSON_OBJECT( country_id : 指名する ) FROM places.countries SELECT country_id, JSON_OBJECT( KEY country_id VALUE 指名する ) FROM places.countries COUNTRY_ID C2 ---------- --------------------- AUT {"AUT":"Austria"} CHE {"CHE":"Switzerland"} DEU {"DEU":"Germany"} ESP {"ESP":"Spain"} FRA {"FRA":"フラン"} ITA {"ITA":"Italy"} SWE {"SWE":"Sweden"}
JSON_OBJECTAGG
JSON_OBJECTAGG ( <JSON 指名する and value> [<JSON null
caluse>] [ { WITH | WITHOUT } UNIQUE [ KEYS] ] )
JSON_OBJECTAGG
is an aggregate 機能(する)/行事 類似の
to the ARRAY_AGG
SQL 機能(する)/行事, It 建設するs a JSON
反対する by using 重要なs and values from the aggregated 列/漕ぐ/騒動s.
(SQL:2023)
-- a JSON 反対する is 建設するd from 多重の 列/漕ぐ/騒動s of the (米)棚上げする/(英)提議する SELECT JSON_OBJECTAGG( country_id : 指名する ) FROM places.countries C1 --------------------------------------------------------------------------------------------------------------- {"AUT":"Austria","CHE":"Switzerland","DEU":"Germany","ESP":"Spain","FRA":"フラン","ITA":"Italy","SWE":"Sweden"}
ABS
ABS ( <num value expr> | <interval value expr>
)
Returns the 絶対の value of the argument as a value of the same type. (SQL:2023)
ACOS
ACOS ( <num value expr> )
Returns the arc-cosine of the argument in radians as a value of DOUBLE type. (SQL:2023)
ASIN
ASIN ( <num value expr> )
Returns the arc-sine of the argument in radians as a value of DOUBLE type. (SQL:2023)
ATAN
ATAN ( <num value expr> )
Returns the arc-tangent of the argument in radians as a value of DOUBLE type. (SQL:2023)
ATAN2
ATAN2 ( <num value expr 1>, <num value expr 2>
)
The <num value expr 1>
and <num
value expr 2>
表明する the x
and
y
調整するs of a point. Returns the angle, in
radians, 代表するing the angle 調整する of the point in polar
調整するs, as a value of DOUBLE type. (JDBC)
CEILING
{ CEIL | CEILING } ( <num value expr> )
Returns the smallest integer greater than or equal to the argument. If the argument is exact numeric then the result is exact numeric with a 規模 of 0. If the argument is approximate numeric, then the result is of DOUBLE type. (SQL:2023)
BITAND
BITAND ( <num value expr 1>, <num value expr 2>
)
BITAND ( <bit value expr 1>, <bit value expr 2>
)
BITANDNOT
BITANDNOT ( <num value expr 1>, <num value expr
2> )
BITANDNOT ( <bit value expr 1>, <bit value expr
2> )
BITNOT
BITNOT ( <num value expr 1> )
BITNOT ( <bit value expr 1> )
BITOR
BITOR ( <num value expr 1>, <num value expr 2>
)
BITOR ( <bit value expr 1>, <bit value expr 2>
)
BITXOR
BITXOR ( <num value expr 1>, <num value expr 2>
)
BITXOR ( <bit value expr 1>, <bit value expr 2>
)
These 機能(する)/行事s 成し遂げる bit 操作/手術s on two values, or in the 事例/患者 of BITNOT on a 選び出す/独身 value. The values are either integer values, or bit strings. The result is an integer value of the same type as the arguments, or a bit string of the same length as the argument. Each bit of the result is formed by 成し遂げるing the 操作/手術 on corresponding bits of the arguments. The 指名するs of the 機能(する)/行事 示す NOT, OR, AND, XOR 操作/手術s. The BITANDNOT 成し遂げるs NOT on the second argument, then 成し遂げるs AND on result and the first argument. (HyperSQL)
COS
COS ( <num value expr> )
Returns the cosine of the argument (an angle 表明するd in radians) as a value of DOUBLE type. (SQL:2023)
COSH
COSH ( <num value expr> )
Returns the hyperbolic cosine of the argument as a value of DOUBLE type. (SQL:2023)
COT
COT ( <num value expr> )
Returns the cotangent of the argument as a value of DOUBLE type. The
<num value expr>
代表するs an angle 表明するd in
radians. (SQL:2023)
DEGREES
DEGREES ( <num value expr> )
変えるs the argument (an angle 表明するd in
radians
) into degrees and returns the value in the DOUBLE type.
(JDBC)
EXP
EXP ( <num value expr> )
Returns the exponential value of the argument as a value of DOUBLE type. (SQL:2023)
FLOOR
FLOOR ( <num value expr> )
Returns the largest integer that is いっそう少なく than or equal to the argument. If the argument is exact numeric then the result is exact numeric with a 規模 of 0. If the argument is approximate numeric, then the result is of DOUBLE type. (SQL:2023)
LN
LN ( <num value expr> )
Returns the natural logarithm of the argument, as a value of DOUBLE type. (SQL:2023)
LOG
LOG ( <num value expr> )
Returns the natural logarithm of the argument, as a value of DOUBLE type. (JDBC)
LOG10
LOG10 ( <num value expr> )
Returns the base 10 logarithm of the argument as a value of DOUBLE type. (SQL:2023)
MOD
MOD ( <num value expr 1>, <num value expr 2> )
Returns the 残りの人,物 (modulus) of <num value expr
1>
divided by <num value expr 2>.
The data type of the returned value is the same as the second argument.
(SQL:2023)
NANVL
NANVL ( <num value expr 1>, <num value expr 2>
)
Returns an 代案/選択肢 for the NaN (Not a Number) 二塁打 value in
<num value expr 1>
as <num value expr
2>.
, さもなければ returns the first argument. The data type of
the returned value is DOUBLE. (HyperSQL)
PI
PI ()
Returns the constant pi as a value of DOUBLE type. (JDBC)
POWER
POWER ( <num value expr 1>, <num value expr 2>
)
Returns the value of <num value expr 1>
raised to the 力/強力にする of <int value expr 2>
as a
value of DOUBLE type. (SQL:2023)
RADIANS
RADIANS ( <num value expr> )
変えるs the argument (an angle 表明するd in
degrees
) into radians and returns the value in the DOUBLE type.
(JDBC)
RAND
RAND ( [ <int value expr> ] )
Returns a 無作為の value in the DOUBLE type. The optional [
<int value expr> ]
is used as seed value. In HyperSQL each
開会/開廷/会期 has a separate 無作為の number 発生させる人(物). The first call that uses a
seed parameter 始める,決めるs the seed for その後の calls that do not 含む a
parameter. (JDBC)
ROUND
ROUND ( <num value expr>, <int value expr> )
The <num value expr>
is of the DOUBLE type
or DECIMAL type. The 機能(する)/行事 returns a DOUBLE or DECIMAL value which is
the value of the argument 一連の会議、交渉/完成するd to <int value
expr>
places 権利 of the decimal point. If <int
value expr>
is 消極的な, the first argument is 一連の会議、交渉/完成するd to
<int value expr>
places to the left of the
decimal point.
This 機能(する)/行事 一連の会議、交渉/完成するs values ending with .5 or larger away from 無 for DECIMAL arguments and results. When the value ends with .5 or larger and the argument and result are DOUBLE, It 一連の会議、交渉/完成するs the value に向かって the closest even value.
The datetime 見解/翻訳/版 is discussed in the next section. (JDBC)
SIGN
SIGN ( <num value expr> )
Returns an INTEGER, 示すing the 調印する of the argument. If the argument is 消極的な then -1 is returned. If it is equal to 無 then 0 is returned. If the argument is 肯定的な then 1 is returned. (JDBC)
SIN
SIN ( <num value expr> )
Returns the sine of the argument (an angle 表明するd in radians) as a value of DOUBLE type. (SQL:2023)
SINH
SINH ( <num value expr> )
Returns the hyperbolic sine of the argument as a value of DOUBLE type. (SQL:2023)
SQRT
SQRT ( <num value expr> )
Returns the square root of the argument as a value of DOUBLE type. (SQL:2023)
TAN
TAN ( <num value expr> )
Returns the tangent of the argument (an angle 表明するd in radians) as a value of DOUBLE type. (SQL:2023)
TANH
TANH ( <num value expr> )
Returns the hyperbolic tangent of the argument as a value of DOUBLE type. (SQL:2023)
TO_NUMBER
TO_NUMBER ( <char value expr> )
成し遂げるs a cast from character to DECIMAL number. The character string must consist of digits and can have a decimal point. Use the SQL 基準 CAST 表現 instead of this 非,不,無-基準 機能(する)/行事. (HyperSQL)
TRUNC
TRUNC ( <num value expr> [, <int value expr>] )
This is a 類似の to the TRUNCATE
機能(する)/行事 when
the first argument is numeric. If the second argument is omitted, 無 is
used in its place.
The datetime 見解/翻訳/版 is discussed in the next section. (HyperSQL)
TRUNCATE
TRUNCATE ( <num value expr> [, <int value
expr>] )
Returns a value in the same type as <num value
expr>
but may 減ずる the 規模 of DECIMAL and NUMERIC values.
The value is 一連の会議、交渉/完成するd by 取って代わるing digits with 無s from <int
value expr>
places 権利 of the decimal point to the end. If
<int value expr>
is 消極的な, ABS(
<int value expr> )
digits to left of the decimal point and
all digits to the 権利 of the decimal points are 取って代わるd with 無s.
Results of calling TRUNCATE with 12345.6789 with (-2, 0, 2, 4) are (12300,
12345, 12345.67, 12345.6789). The 機能(する)/行事 does not change the number if
the second argument is larger than or equal to the 規模 of the first
argument.
If the second argument is not a constant (when it is a parameter or column 言及/関連) then the type of the return value is always the same as the type of the first argument. In this 事例/患者, the discarded digits are 取って代わるd with 無s. (JDBC)
WIDTH_BUCKET
WIDTH_BUCKET ( <value expr 1> , <value expr 2>,
<value expr 3>, <int value expr> )
Returns an integer value between 0 and <int value
expr> + 1
. The 初期の three parameters are of the same
numeric or datetime type. The 範囲, ( <value expr 2> ,
<value expr 3>
) is divided into <int value
expr>
equal sections (buckets). The returned integer value
示すs the 索引 of the bucket where <value expr
1>
can be placed. If the <value expr
1>
落ちるs before or after the 範囲, the return value is 0 or
<value expr 1> + 1
それぞれ.
This 機能(する)/行事 can be used with numeric or datetime values. 無効の
arguments, 含むing <int value expr>
smaller
than 1, or equal values for <value expr 2>
and
<value expr 3>
will 原因(となる) an exception.
(SQL:2023)
An example is given below:
WIDTH_BUCKET( 5, 10, 110, 10) 0 WIDTH_BUCKET( 23, 10, 110, 10) 2 WIDTH_BUCKET( 100, 10, 110, 10) 10 WIDTH_BUCKET( 200, 10, 110, 10) 11
機能(する)/行事s to 報告(する)/憶測 the time zone.
TIMEZONE
TIMEZONE()
Returns the 現在の time zone 排水(気)量 for the 開会/開廷/会期. This value is the same as SESSION_TIMEZONE if the 使用者 has not changed the TIME ZONE of the 開会/開廷/会期. Returns an INTERVAL HOUR TO MINUTE value. (HyperSQL)
SESSION_TIMEZONE
SESSION_TIMEZONE()
Returns the 初期の (default) time zone 排水(気)量 for the 現在の 開会/開廷/会期. Returns an INTERVAL HOUR TO MINUTE value. (HyperSQL)
SESSIONTIMEZONE
SESSIONTIMEZONE()
Returns the same value as SESSION_TIMEZONE. (HyperSQL)
DATABASE_TIMEZONE
DATABASE_TIMEZONE()
Returns the time zone 排水(気)量 for the database engine. This is based on where the database server 過程 is 位置を示すd. Returns an INTERVAL HOUR TO MINUTE value. (HyperSQL)
DBTIMEZONE
DBTIMEZONE()
類似の to DATABASE_TIMEZONE. Returns a string. 作品 in ORA compatibility 方式 only.(HyperSQL)
CURRENT_DATE
CURRENT_DATE
CURRENT_TIME
CURRENT_TIME [ ( <time precision> )
]
LOCALTIME
LOCALTIME [ ( <time precision> ) ]
CURRENT_TIMESTAMP
CURRENT_TIMESTAMP [ ( <timestamp precision> )
]
LOCALTIMESTAMP
LOCALTIMESTAMP [ ( <timestamp precision> )
]
These datetime 機能(する)/行事s return the datetime value 代表するing
the moment the 機能(する)/行事 is called. CURRENT_DATE
returns a value of DATE type. CURRENT_TIME
returns a
value of TIME WITH TIME ZONE type with the time zone of the SQL 開会/開廷/会期.
LOCALTIME
returns a value of TIME type.
CURRENT_TIMESTAMP
returns a value of TIMESTAMP WITH
TIME ZONE type with the time zone of the SQL 開会/開廷/会期.
LOCALTIMESTAMP
returns a value of TIMESTAMP type. If
the optional [ ( <time precision> ) ]
or [ ( <timestamp precision> ) ]
is used, then
the returned value has the 明示するd fraction of the second precision.
When the 機能(する)/行事s are used 多重の times in a 選び出す/独身 SQL 声明,
the returned values 代表する the same point of time.
From 見解/翻訳/版 2.7.0 the 機能(する)/行事s return values with microsecond precision. Previous 見解/翻訳/版s returned values with millisecond precision. (SQL:2023)
NOW
NOW ()
This 機能(する)/行事 is 同等(の) to LOCALTIMESTAMP
.
It can be used as a no-arg 機能(する)/行事 as the parens are optional.
(HyperSQL)
CURDATE
CURDATE ()
This 機能(する)/行事 is 同等(の) to CURRENT_DATE
.
(JDBC)
CURTIME
CURTIME ()
This 機能(する)/行事 is 同等(の) to LOCALTIME
.
(JDBC)
SYSDATE
SYSDATE
This no-arg 機能(する)/行事 is 類似の to LOCALTIMESTAMP
but it returns the timestamp of the HyperSQL server as …に反対するd
to the 現在の 開会/開廷/会期. The returned timestamp is without fraction of
second. (HyperSQL)
SYSTIMESTAMP
SYSTIMESTAMP
This no-arg 機能(する)/行事 is 類似の to
CURRENT_TIMESTAMP
but it returns the timestamp with
time zone of the HyperSQL server as …に反対するd to the 現在の 開会/開廷/会期. The
機能(する)/行事 is enabled in ORA syntax 方式 only. (HyperSQL)
TODAY
TODAY
This no-arg 機能(する)/行事 is 同等(の) to CURRENT_DATE.
(HyperSQL)
DATENAME, DATEPART and EOMONTH
These 機能(する)/行事s are 利用できる in the MSS compatibility 方式 and
成し遂げる the 同等(の) of EXTRACT
機能(する)/行事 or the
LAST_DAY
機能(する)/行事. (HyperSQL)
DAYNAME
DAYNAME ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( DAY_NAME FROM
... )
Returns a string in the 範囲 of Sunday - Saturday.
(JDBC)
DAYOFMONTH
DAYOFMONTH ( <datetime value expr>
)
This 機能(する)/行事 is 同等(の) to EXTRACT ( DAY_OF_MONTH
FROM ... )
Returns an integer value in the 範囲 of 1-31.
(JDBC)
DAYOFWEEK
DAYOFWEEK ( <datetime value expr>
)
This 機能(する)/行事 is 同等(の) to EXTRACT ( DAY_OF_WEEK FROM
... )
Returns an integer value in the 範囲 of 1-7. The first
day of the week is Sunday. (JDBC)
DAYOFYEAR
DAYOFYEAR ( <datetime value expr>
)
This 機能(する)/行事 is 同等(の) to EXTRACT ( DAY_OF_YEAR FROM
... )
Returns an integer value in the 範囲 of 1-366.
(JDBC)
DAYS
DAYS ( <datetime value expr> )
The <datetime value expr>
is of DATE or
TIMESTAMP type. This 機能(する)/行事 returns the DAY number since the first day
of the calendar. The first day is numbered 1. (HyperSQL)
HOUR
HOUR ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( HOUR FROM ... )
Returns an integer value in the 範囲 of 0-23. (JDBC)
MINUTE
MINUTE ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( MINUTE FROM ...
)
Returns an integer value in the 範囲 of 0 - 59.
(JDBC)
MONTH
MONTH ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( MONTH FROM ... )
Returns an integer value in the 範囲 of 1-12. (JDBC)
MONTHNAME
MONTHNAME ( <datetime value expr>
)
This 機能(する)/行事 is 同等(の) to EXTRACT ( NAME_OF_MONTH
FROM ... )
Returns a string in the 範囲 of January -
December. (JDBC)
QUARTER
QUARTER ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( QUARTER FROM ...
)
Returns an integer in the 範囲 of 1 - 4. (JDBC)
SECOND
SECOND ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( SECOND FROM ...
)
Returns a decimal in the 範囲 of 0 - 60, with the same
precision as the <datetime value expr>. (JDBC)
SECONDS_SINCE_MIDNIGHT
SECONDS_SINCE_MIDNIGHT ( <datetime value expr>
)
This 機能(する)/行事 is 同等(の) to EXTRACT (
SECONDS_SINCE_MIDNIGHT FROM ... )
Returns an integer in the
範囲 of 0 - 86399. (HyperSQL)
UNIX_MILLIS
UNIX_MILLIS ( [ <datetime value 表現> ] )
This 機能(する)/行事 returns a BIGINT value. With no parameter, it returns the number of milliseconds since 1970-01-01. With a DATE or TIMESTAMP parameter, it 変えるs the argument into number of milliseconds since 1970-01-01. (HyperSQL)
UNIX_TIMESTAMP
UNIX_TIMESTAMP ( [ <datetime value 表現> ] )
This 機能(する)/行事 returns a BIGINT value. With no parameter, it
returns the number of seconds since 1970-01-01. With a DATE or TIMESTAMP
parameter, it 変えるs the argument into number of seconds since
1970-01-01. See also the TIMESTAMP ( <num value
表現> )
機能(する)/行事 to return a TIMESTAMP from a Unix
timestamp. (HyperSQL)
WEEK
WEEK ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( WEEK_OF_YEAR
FROM ... )
Returns an integer in the 範囲 of 1 - 54.
(JDBC)
YEAR
YEAR ( <datetime value expr> )
This 機能(する)/行事 is 同等(の) to EXTRACT ( YEAR FROM ... )
Returns an integer in the 範囲 of 1 - 9999. (JDBC)
EXTRACT
EXTRACT ( <抽出する field> FROM <抽出する
source> )
<抽出する field> ::= YEAR | MONTH | DAY | HOUR |
MINUTE | DAY_OF_WEEK | WEEK_OF_YEAR | QUARTER | DAY_OF_YEAR |
DAY_OF_MONTH |
TIMEZONE_HOUR | TIMEZONE_MINUTE | SECOND |
SECONDS_SINCE_MIDNIGHT |
DAY_NAME | MONTH_NAME
<抽出する source> ::= <datetime value expr> |
<interval value expr>
The EXTRACT 機能(する)/行事 returns a field or element of the
<抽出する source>
. The <抽出する
source>
is a datetime or interval 表現. The type of
the return value is BIGINT for most of the <抽出する
field>
選択s. The exception is SECOND
,
where a DECIMAL value is returned which has the same precision as the
datetime or interval 表現. The field values DAY_NAME
or MONTH_NAME
result in a character string.
When MONTH_NAME
is 明示するd, a string in the 範囲
January - December is returned. When DAY_NAME
is
明示するd, a string in the 範囲 Sunday -Saturday is returned.
If the <抽出する source>
is FROM
<datetime value expr>
, different groups of
<抽出する source>
can be used depending on the
data type of the 表現. The TIMEZONE_HOUR |
TIMEZONE_MINUTE
選択s are valid only for TIME WITH TIMEZONE
and TIMESTAMP WITH TIMEZONE data types. The HOUR | MINUTE |
SECOND | SECONDS_MIDNIGHT
選択s, are valid for TIME and
TIMESTAMP types. The 残り/休憩(する) of the fields are valid for DATE and TIMESTAMP
types.
If the <抽出する source>
is FROM
<interval value expr>
, the <抽出する
field>
must be one of the fields of the INTERVAL type of
the 表現s. The YEAR | MONTH
選択s may be
valid for INTERVAL types based on months. The DAY | HOUR |
MINUTE | SECOND | SECONDS_MIDNIGHT
選択s may be valid for
INTERVAL types based on seconds. For example, DAY | HOUR |
MINUTE
are the only valid fields for the INTERVAL DAY TO
MINUTE data type. (SQL:2023 with HyperSQL 拡張s)
NEXT_DAY
NEXT_DAY ( <datetime value expr>, <character
value expr>)
This 機能(する)/行事 returns a TIMESTAMP for compatibility 推論する/理由s. The
return value is the next weekday 指名するd by the second argument that
occurs after the first date. For example, next Wednesday is 表明するd as
NEXT_DAY(CURRENT_DATE, 'WEDNESDAY')
.
(HyperSQL)
ADD_MONTHS
ADD_MONTHS ( <datetime value expr>, <numeric
value expr>)
This 機能(する)/行事 is 類似の but different to simple 新規加入 of a
MONTH interval to a datetime value. The SQL 基準 表現,
<datetime value expr> + n MONTH
, when used with
the last day of a short month such as February, returns a date that has
the same day of the month in the 的 month. The
ADD_MONTHS
機能(する)/行事 adjusts the 的 day to the
last day of the 的 month. For all other days, the behaviour is the
same. This 機能(する)/行事 always returns a TIMESTAMP(0) value, 関わりなく
the type of the argument. (HyperSQL)
The example below compares the 生産(高) of the 機能(する)/行事 and the 表現.
VALUES ADD_MONTHS ( DATE '2012-02-29' , 1), DATE '2012-02-29' + 1 MONTH C1 C2 ------------------- ---------- 2012-03-31 00:00:00 2012-03-29
LAST_DAY
LAST_DAY ( <datetime value expr> )
Returns the last day of the month for the given
<datetime value expr>
. The returned value
保存するs the year, month, hour, minute and second fields of the
timestamp. The type of the result is always TIMESTAMP(0).
(HyperSQL)
VALUES LAST_DAY ( TIMESTAMP '2012-02-14 12:30:44') C1 ------------------- 2012-02-29 12:30:44
MONTHS_BETWEEN
MONTHS_BETWEEN ( <datetime value expr1> ,
<datetime value expr2> )
Returns a number (not an INTERVAL) かもしれない with a fraction, 代表するing the number of months between two days. If both dates have the same day of month, or are on the last day of the month, the result is an exact numeric. さもなければ, the fraction is calculated based on 31 days per month. You can cast the resulting value into INTERVAL MONTH and use it for datetime arithmetic. (HyperSQL)
VALUES MONTHS_BETWEEN ( TIMESTAMP '2013-02-14 12:30:44', TIMESTAMP '2012-01-04 12:30:44') C1 ----------------------------------- 13.32258064516129000000000000000000
TIMESTAMPADD
TIMESTAMPADD ( <tsi datetime field>, <numeric
value 表現>, <datetime value expr>)
TIMESTAMPDIFF
TIMESTAMPDIFF ( <tsi datetime field>, <datetime
value expr 1>, <datetime value expr 2>)
<tsi datetime field> ::= SQL_TSI_FRAC_SECOND |
SQL_TSI_MILLI_SECOND | SQL_TSI_SECOND | SQL_TSI_MINUTE | SQL_TSI_HOUR |
SQL_TSI_DAY | SQL_TSI_WEEK | SQL_TSI_MONTH | SQL_TSI_QUARTER |
SQL_TSI_YEAR
HyperSQL supports 十分な SQL 基準 datetime features. It supports
追加するing integers 代表するing 部隊s of time 直接/まっすぐに to datetime values
using the arithmetic 加える 操作者. It also supports subtracting one
<datetime value expr>
from another in the given
部隊s of date or time using the minus 操作者. An example of
<datetime value expr> + <numeric value 表現>
<datetime field>
is LOCALTIMESTAMP + 5
DAY
. An example of ( <datetime value expr> -
<numeric value 表現> ) <datetime field>
is
(CURRENT_DATE - DATE '2008-08-8') MONTH
which returns
the number of calendar months between the two dates.
The two JDBC 機能(する)/行事s, TIMESTAMPADD
and
TIMESTAMPDIFF
成し遂げる a 類似の 機能(する)/行事 to the above
SQL 表現s. The <tsi datetime field> 指名するs are keywords and
are different from those used in the EXTRACT
機能(する)/行事s. These 指名するs are valid for use only when calling these two
機能(する)/行事s. With TIMESTAMPDIFF
, the 指名するs 示す the
部隊 of time used to 計算する the difference between two datetime fields.
With TIMESTAMPADD
they 代表する the 部隊 of time
used for the <numeric value 表現>. The 部隊 of time for each
指名する is self-explanatory. In the 事例/患者 of SQL_TSI_FRAC_SECOND, the 部隊
is nanosecond.
The type of the return value for TIMESTAMPADD
is the same as the type of the datetime argument used, except when the
argument type is DATE and a 部隊 smaller than DAY is 追加するd the return
type is TIMESTAMP. The return type for TIMESTAMPDIFF
is always BIGINT, 関わりなく the type of arguments. The two datetime
arguments of TIMESTAMPDIFF
should be of the same
type. The TIME type is not supported for the arguments to these
機能(する)/行事s.
TIMESTAMPDIFF
is 評価するd as <datetime
value expr 2> - <datetime value expr 1>. (JDBC)
TIMESTAMPADD ( SQL_TSI_MONTH, 3, DATE '2008-11-22' ) TIMESTAMPDIFF ( SQL_TSI_HOUR, TIMESTAMP '2008-11-20 20:30:40', TIMESTAMP '2008-11-21 21:30:40' )
DATE_ADD
DATE_ADD ( <datetime value expr> , <interval
value expr> )
DATE_SUB
DATE_SUB ( <datetime value expr> , <interval
value expr> )
These 機能(する)/行事s are 同等(の) to arithmetic 新規加入 and
subtraction, <datetime value expr> + <interval value
expr>
and <datetime value expr> -
<interval value expr>
. The 機能(する)/行事s are 供給するd for
compatibility with other databases. The supported interval 部隊s are the
基準 SQL interval 部隊 名簿(に載せる)/表(にあげる)d in other 一時期/支部s of this guide. The
TIME type is supported for the argument to these 機能(する)/行事s.
(HyperSQL)
DATE_ADD ( DATE '2008-11-22', INTERVAL 3 MONTH ) DATE_SUB ( TIMESTAMP '2008-11-22 20:30:40', INTERVAL 20 HOUR )
DATEADD
DATEADD ( <field>, <numeric value expr>,
<datetime value expr> )
DATEDIFF
DATEDIFF ( <field>, <datetime value expr 1>,
<datetime value expr 2> )
<field> ::= 'yy' | 'year' | 'qq' | '4半期/4分の1' |'mm'
| 'month' | 'dd' | 'day' | 'hh' | 'hour' | 'mi' | 'minute' | 'ss' |
'second' | 'ms' | 'millisecond' | 'mcs' | 'microsecond' | 'ns' |
'nanosecond'
<field> ::= YY | YEAR | QQ | QUARTER | MM | MONTH |
DD | DAY | HH | HOUR | MI | MINUTE | SS | SECOND | MS | MILLISECOND |
MCS | MICROSECOND | NS | NANOSECOND
The DATEADD
and DATEDIFF
機能(する)/行事s are 代案/選択肢s to TIMESTAMPADD
and
TIMESTAMPDIFF
, with 類似の field 選択s. The field
指名するs are 明示するd as strings or as keywords. The short field 指名するs
translate to YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, MILLISECOND,
MICROSECOND and NANOSECOND. DATEDIFF
is 評価するd as
<datetime value expr 2> - <datetime value expr
1>
. (HyperSQL}
DATEDIFF ( <datetime value expr 1>, <datetime
value expr 2> )
This special form of DATEDIFF
does not have a
field parameter and return the number of days between two dates. This
form is 評価するd as <datetime value expr 1> -
<datetime value expr 2>
, which is different from the
main form. This form is 両立できる with some other database engines. The
TIME type is not supported for the arguments to these 機能(する)/行事s.
(HyperSQL}
DATEADD ( 'month', 3, DATE '2008-11-22' ) DATEDIFF ( 'hour', TIMESTAMP '2008-11-22 20:30:40', TIMESTAMP '2008-11-22 00:30:40' )
ROUND
ROUND ( <datetime value expr> [ , <char value
expr> ] )
The <datetime value expr>
is of DATE,
TIME or TIMESTAMP type. The <char value expr>
is one of the 判型 strings: 'YYYY', 'YY', 'MONTH', 'MM', 'WW', 'IW',
'DDD', 'DD', 'HH24', 'HH12', 'HH', 'MI', 'SS'; represeting YEAR, MONTH,
WEEK OF YEAR, ISO WEEK, DAY, HOUR, MINUTE or SECOND as 名簿(に載せる)/表(にあげる)d in the
(米)棚上げする/(英)提議する for TO_CHAR and TO_DATE 判型 elements (see below). The datetime
value is 一連の会議、交渉/完成するd up or 負かす/撃墜する after the 明示するd field and the 残り/休憩(する) of
the fields to the 権利 are 始める,決める to the 最小限 value (one for MONTH and
DAY, or 無, for the 残り/休憩(する) of the fields). For example, 一連の会議、交渉/完成するing a
timestamp value on the DAY field results in midnight the same date or
midnight the next day if the time is at or after 12 noon. If the second
argument is omitted, the datetime value is 一連の会議、交渉/完成するd to the nearest day.
(HyperSQL)
TRUNC
TRUNC ( <datetime value expr> [ , <char value
expr> ] )
類似の to the ROUND 機能(する)/行事, the datetime value is truncated
after the 明示するd field and the 残り/休憩(する) of the fields to the 権利 are
始める,決める to the 最小限 value (one for MONTH and DAY, or 無, for the 残り/休憩(する)
of the fields). For example, 適用するing TRUNC
to a
timestamp value on the DAY field results in midnight the same date.
Examples of ROUND
and TRUNC
機能(する)/行事s are given below. If the second argument is omitted, the
datetime value is truncated to midnight the same date. (HyperSQL)
ROUND ( TIMESTAMP'2008-08-01 20:30:40', 'YYYY' ) TIMESTAMP '2009-01-01 00:00:00' TRUNC ( TIMESTAMP'2008-08-01 20:30:40', 'YYYY' ) TIMESTAMP '2008-01-01 00:00:00'
FROM_TZ
FROM_TZ ( <timestamp value expr>, <zone or
interval spec string> )
This 機能(する)/行事 takes the date-time (year, month, day, hour, minute, second, fraction) from the first argument and the time zone from the second argument to 建設する a TIMESTAMP WITH TIME ZONE value. The 生産(高) can 代表する a different point of 全世界の/万国共通の time (UTC) than the input. This is different from the AT TIME ZONE 表現 which keeps the UTC value and changes the zone. (HyperSQL)
-- the 生産(高) shows the same timestamp as the input, but with the time zone of the 明示するd 地域 VALUES FROM_TZ(TIMESTAMP'2022-03-28 11:00:00+4:00','America/Chicago') C1 ------------------------------- 2022-03-28 11:00:00.000000-5:00 -- this example has the same 生産(高) as the previous one VALUES FROM_TZ(TIMESTAMP'2022-03-28 11:00:00','-5:00')
NUMTODSINTERVAL
NUMTODSINTERVAL ( <numeric value expr>,
<interval spec string> )
This 機能(する)/行事 変えるs the numeric value to an interval, 正確に/まさに like CAST. The interval spec string is one of 'DAY', 'HOUR', 'MINUTE', 'SECOND'. (HyperSQL)
NUMTOYMINTERVAL
NUMTOYMINTERVAL ( <numeric value expr>,
<interval spec string> )
This 機能(する)/行事 変えるs the numeric value to an interval, 正確に/まさに like CAST. The interval spec string is 'YEAR' or 'MONTH'. (HyperSQL)
TIMESTAMP
TIMESTAMP ( <num value expr> )
TIMESTAMP ( <char value expr> )
TIMESTAMP ( <char value expr>, <char value
expr> )
TIMESTAMP ( <date value expr>, <time value
expr> )
This 機能(する)/行事 translates the arguments into a TIMESTAMP WITHOUT TIME ZONE value.
When the 選び出す/独身 argument is a numeric value, it is 解釈する/通訳するd as a Unix timestamp in seconds.
When the 選び出す/独身 argument is a formatted date or timestamp string, it is translated to a TIMESTAMP.
When two arguments are used, the first argument is the DATE part and the second argument is the TIME part of the returned TIMESTAMP value. The types of the arguments can be DATE and TIME それぞれ, or they can be any character string type. An example, 含むing the result, is given below:
TIMESTAMP ( '2008-11-22', '20:30:40' ) TIMESTAMP '2008-11-22 20:30:40.000000'
TIMESTAMP_WITH_ZONE
TIMESTAMP_WITH_ZONE ( <num value expr> )
TIMESTAMP_WITH_ZONE ( <char value expr> )
This 機能(する)/行事 translates the arguments into a TIMESTAMP WITH TIME ZONE value.
When the 選び出す/独身 argument is a numeric value, it is 解釈する/通訳するd as a Unix timestamp in seconds.
When the 選び出す/独身 argument is TIMESTAMP, it is 変えるd to TIMESTAMP WITH TIME ZONE.
The time zone of the returned value is the 地元の time zone at the time of the timestamp argument. This accounts for daylight saving times. For example, if the 地元の time zone was +4:00 at the time of the given Unix timestamp, the returned value is 地元の timestamp at the time with time zone +4:00.
TO_CHAR
TO_CHAR ( <datetime value expr>, <char value
expr> )
This 機能(する)/行事 判型s a datetime value to the 判型 given in the second argument. See TO_TIMESTAMP below for the 詳細(に述べる)s of the 判型 string. 判型 elements such as DAY or HH12 are used in the examples below, with the result 含むd.
Separator characters (space, comma, period, hyphen, 結腸, semicolon, 今後 削除する) can be 含むd between the pattern elements. You can 含む a string literal inside the 判型 string by enclosing it in 二塁打 引用するs (see the second example above). Unsupported 判型 characters should not be used. (HyperSQL)
TO_CHAR ( TIMESTAMP'2008-02-01 20:30:40', 'YYYY BC DAY DD MONTH HH12 AM' ) 2008 AD Friday 01 February 08 pm TO_CHAR ( DATE'2018-03-01', '"in" YYYY", on" DD MONTH' ) in 2018, on 01 March
TO_DATE
TO_DATE ( <char value expr>, <char value
expr> )
TO_TIMESTAMP
TO_TIMESTAMP ( <char value expr>, <char value
expr> )
TO_TIMESTAMP_TZ
TO_TIMESTAMP_TZ ( <char value expr>, <char value
expr> )
These 機能(する)/行事s translate a formatted datetime string to a TIMESTAMP. TO_DATE returns a TIMESTAMP(0) value with no sub-second fraction. TO_TIMESTAMP returns a TIMESTAMP(6). TO_TIMESTAMP_TZ returns a TIMESTAMP(6) WITH TIME ZONE value. The 判型 string can 含む/封じ込める pattern elements from the 名簿(に載せる)/表(にあげる) given below, 加える punctuation and space characters. The pattern should 含む/封じ込める all the necessary fields to 建設する a date, 含むing, year, month, day of month, etc. The returned timestamp can then be cast into DATE if necessary. Two examples together with the result are given below:
TO_TIMESTAMP ( '22/11/2008 20:30:40', 'DD/MM/YYYY HH:MI:SS' ) TO_TIMESTAMP ( '22/11/2008 20:30:40', 'JAVA:dd/MM/uuuu HH:mm:ss' ) // Java 判型 TIMESTAMP '2008-11-22 20:30:40.000000'
The 判型 strings that can be used for TO_DATE and TO_TIMESTAMP are more 制限する than those used for TO_CHAR, because the 判型 string must 含む/封じ込める the elements needed to build a 十分な DATE or TIMESTAMP value. For example, you cannot use the 'W', 'HH12' 判型 elements.
The 判型 is internally translated to a
java.time.判型.DateTimeFormatter
判型 string.
Unsupported 判型 strings should not be used. With TO_CHAR, you can
含む a string literal inside the 判型 string by enclosing it in
二塁打 引用するs.
From 見解/翻訳/版 2.7.3 Java 判型 strings as defined by
java.time.判型.DateTimeFormatter
can be used
直接/まっすぐに as an 代案/選択肢. These 判型 strings must have the
'JAVA:'
prefix as in the second example above, and
the literals inside the 判型 string must be enclosed in 二塁打 選び出す/独身
引用するs as 要求するd by Java
DateTimeFormatter
.(HyperSQL)
The supported 判型 構成要素s are all uppercase as follows:
(米)棚上げする/(英)提議する 4.2. TO_CHAR, TO_DATE and TO_TIMESTAMP 判型 elements
BC | B.C. | AD | A.D. | Returns AD for ありふれた 時代. |
RRRR |
4-digit year |
YYYY |
4-digit year |
IYYY |
4-digit year, corresponding to ISO week of the year. The 報告(する)/憶測d year for the last few days of the calendar year may be the next year. |
YY |
2 digit year |
IY |
2 digit year, corresponding to ISO week of the year |
MM |
Month (01-12) |
MON |
Short three-letter 指名する of month |
MONTH |
指名する of month |
IW |
Week of year (1-52 or 1-53) based on the ISO 基準. Week starts on Monday. The first week may start 近づく the end of previous year. |
W |
Week of month (0-5) where the first day of the month is in week 1, or in week 0 for an ISO week at the beginning of the calendar year which starts in the previous week-based year. Week starts on Monday. |
DAY |
指名する of day. |
DD |
Day of month (01-31). |
DDD |
Day of year (1-366). |
DY |
Short three-letter 指名する of day. |
HH12 |
Hour of day (0-11). |
AM | A.M. | PM | P.M. |
Meridian 指示する人(物). |
HH |
Hour of day (00-23). |
HH24 |
Hour of day (00-23). |
MI |
Minute (00-59). |
SS |
Second (00-59). |
FF[1-9] |
わずかの seconds. With TO_CHAR, 'FF' 示すs six digits are written. 'FF' followed by a 選び出す/独身 digit 令状s the 示すd number of digits. For example 'FF2' means 2 digits after the fraction. With TO_TIMESTAMP, 'FF' 示すs a variable number of up to 9 digits are read. |
TZ |
Time zone hours and minutes. |
Array 機能(する)/行事s are specialised 機能(する)/行事s with ARRAY parameters or return values. For the ARRAY_AGG aggregate 機能(する)/行事, see the Data 接近 and Change 一時期/支部.
CARDINALITY
CARDINALITY( <array value expr> )
Returns the element count for the given array argument. (SQL:2023)
MAX_CARDINALITY
MAX_CARDINALITY( <array value expr>
)
Returns the 最大限 許すd element count for the given array argument. (SQL:2023)
POSITION_ARRAY
POSITION_ARRAY( <value 表現> IN <array value
expr> [ FROM <int value expr> ] )
Returns the position of the first match for the <value
表現>
in the array. By default, the search starts from
the beginning of the array. The optional <int value
expr>
明示するs the start position. Positions are counted
from 1. Returns 無 if no match is 設立する. (HyperSQL)
SORT_ARRAY
SORT_ARRAY( <array value expr> [ { ASC | DESC } ] [
NULLS { FIRST | LAST } ] )
Returns a sorted copy of the array. By default, sort is 成し遂げるd in 上がるing order and NULL elements are sorted first. (HyperSQL)
TRIM_ARRAY
TRIM_ARRAY( <array value expr>, <num value
expr> )
Returns a new array that 含む/封じ込めるs the elements of the
<array value expr>
minus the number of elements
明示するd by the <num value expr>.
Elements are
discarded from the end of the array. (SQL:2023)
SEQUENCE_ARRAY
SEQUENCE_ARRAY( <value expr 1>, <value expr 2>,
<value expr 3 )
Returns a new array that 含む/封じ込めるs a sequence of values. The
<value expr 1>
is the lower bound of the 範囲.
The <value expr 2>
is the upper bound of the
範囲. The <value expr 3>
is the increment. The
elements of the array are within the inclusive 範囲. The first element is
<value expr 1>
and each その後の element is the
sum of the previous element and the increment. If the increment is 無,
only the first element is returned. When the increment is 消極的な, the
lower bound should be larger than the upper bound. The type of the
arguments can be all number types, or a datetime 範囲 and an interval for
the third argument (HyperSQL)
In the examples below, a number sequence and a date sequence are shown. The UNNEST (米)棚上げする/(英)提議する 表現 is used to form a (米)棚上げする/(英)提議する from the array.
SEQUENCE_ARRAY(0, 100, 5) ARRAY[0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100] SELECT * FROM UNNEST(SEQUENCE_ARRAY(10, 12, 1)) C1 -- 10 11 12 SELECT * FROM UNNEST(SEQUENCE_ARRAY(CURRENT_DATE, CURRENT_DATE + 6 DAY, 1 DAY)) WITH ORDINALITY AS T(D, I) D I ---------- - 2010-08-01 1 2010-08-02 2 2010-08-03 3 2010-08-04 4 2010-08-05 5 2010-08-06 6 2010-08-07 7
General 機能(する)/行事s can take different types of arguments. Some General 機能(する)/行事s 受託する a variable number of arguments.
Also see the Data 接近 and Change 一時期/支部 for SQL 表現s that are
類似の to 機能(する)/行事s, for example CAST
and
NULLIF
.
CASEWHEN
CASEWHEN( <boolean value expr>, <value expr 2>,
<value expr 3> )
If the <boolean value expr>
is true,
returns <value expr 2>
さもなければ returns
<value expr 3>. Use a CASE WHEN 表現 instead for more
広範囲にわたる 能力s and 選択s.
CASE WHEN
is 文書d in the Data 接近 and Change 一時期/支部. (HyperSQL)
COALESCE
COALESCE( <value expr 1>, <value expr 2> [,
...] )
Returns <value expr 1>
if it is not null,
さもなければ returns <value expr 2>
if not null and
so on. The type of both arguments must be 類似の. (SQL:2023)
CONVERT
CONVERT ( <value expr> , <data type>
)
<data type> ::= { SQL_BIGINT | SQL_BINARY | SQL_BIT
|SQL_BLOB | SQL_BOOLEAN | SQL_CHAR | SQL_CLOB | SQL_DATE | SQL_DECIMAL |
SQL_DATALINK |SQL_DOUBLE | SQL_FLOAT | SQL_INTEGER | SQL_LONGVARBINARY |
SQL_LONGNVARCHAR | SQL_LONGVARCHAR | SQL_NCHAR | SQL_NCLOB | SQL_NUMERIC |
SQL_NVARCHAR | SQL_REAL | SQL_ROWID | SQL_SQLXML | SQL_SMALLINT | SQL_TIME
| SQL_TIMESTAMP | SQL_TINYINT | SQL_VARBINARY | SQL_VARCHAR} [ (
<precision, length or 規模 parameters> ) ]
The CONVERT 機能(する)/行事 is a JDBC escape 機能(する)/行事, 同等(の) to the
SQL 基準 CAST 表現. It 変えるs the <value
expr>
into the given <data type>
and
returns the value. The <data type>
選択s are
synthetic 指名するs made by prefixing type 指名するs with SQL_
.
Some of the <data type>
選択s 代表する valid
SQL types, but some are based on 非,不,無-基準 type 指名するs, すなわち
{ SQL_LONGNVARCHAR | SQL_LONGVARBINARY |SQL_LONGVARCHAR |
SQL_TINYINT }
. 非,不,無 of the synthetic 指名するs can be used in any
other 状況 than the CONVERT 機能(する)/行事.
The 鮮明度/定義 of CONVERT in the JDBC 基準 does not 許す the precision, 規模 or length to be 明示するd. This is 要求するd by the SQL 基準 for BINARY, BIT, BLOB, CHAR, CLOB, VARBINARY and VARCHAR types and is often needed for DECIMAL and NUMERIC. Defaults are used for precision.
HyperSQL also 許すs the use of real type 指名するs (without the
SQL_
prefix). In this usage, HyperSQL 許すs the use of
precision, 規模 or length for the type 鮮明度/定義 when they are valid for
the type 鮮明度/定義.
When MS SQL Server compatibility 方式 is on, the parameters of CONVERT are switched and only the real type 指名するs with 要求するd precision, 規模 or length are 許すd. (JDBC)
DECODE
DECODE( <value expr main>, <value expr match
1>, <value expr result 1> [...,] [, <value expr default>]
)
DECODE takes at least 3 arguments. The <value expr
main>
is compared with <value expr match
1>
and if it matches, <value expr result
1>
is returned. If there are 付加 pairs of
<value expr match n>
and <value expr
result n>
, comparison is repeated until a match is 設立する the
result is returned. If no match is 設立する, the <value expr
default>
is returned if it is 明示するd, さもなければ NULL is
returned. The type of the return value is a combination of the types of
the <value expr result ... >
arguments.
(HyperSQL)
GREATEST
GREATEST( <value expr 1>, [<value expr ...>,
...] )
The GREATEST 機能(する)/行事 takes one or more arguments. It compares the arguments with each other and returns the greatest argument. Arguments can be of any type, so long as they are 類似の. The return type is the 連合させるd type of the arguments. For example comparing an integer value with a 二塁打 value will return the greatest value as a DOUBLE. (SQL:2023)
IFNULL
ISNULL
IFNULL | ISNULL ( <value expr 1>, <value expr
2> )
Returns <value expr 1>
if it is not null,
さもなければ returns <value expr 2>
. The type of the
return value is the type of <value expr 1>
.
Almost 同等(の) to SQL 基準 COALESCE(<value expr 1>,
<value expr 2>)
機能(する)/行事, but without type aggregation.
(JDBC)
LEAST
LEAST( <value expr 1>, [<value expr ...>, ...]
)
The LEAST 機能(する)/行事 takes one or more arguments. It compares the arguments with each other and returns the smallest argument. Arguments can be of any type, so long as they are 類似の. The return type is the 連合させるd type of the arguments. For example comparing an integer value with a 二塁打 value will return the smallest value as a DOUBLE. (SQL:2023)
LOAD_FILE
LOAD_FILE ( <char value expr 1> [, <char value
expr 2>] )
Returns a BLOB or CLOB 含む/封じ込めるing the URL or とじ込み/提出する path 明示するd in the first argument. If used with a 選び出す/独身 argument, the 機能(する)/行事 returns a BLOB. If used with two arguments, the 機能(する)/行事 returns a CLOB and the second argument is the character encoding of the とじ込み/提出する.
The とじ込み/提出する path is 解釈する/通訳するd the same way as a TEXT TABLE source
とじ込み/提出する 場所. The hsqldb.allow_full_path
system
所有物/資産/財産 must be 始める,決める true
ーするために 接近 とじ込み/提出するs
outside the directory structure of the database とじ込み/提出するs.
(HyperSQL)
NULLIF
NULLIF( <value expr 1>, <value expr 2>
)
Returns <value expr 1>
if it is not equal
to <value expr 2>
, さもなければ returns null. The
type of both arguments must be the same. This 機能(する)/行事 is a shorthand for
a 明確な/細部 CASE 表現. (SQL:2023)
NVL
NVL( <value expr 1>, <value expr 2>
)
Returns <value expr 1>
if it is not null,
さもなければ returns <value expr 2>
. The type of the
return value is the type of <value expr 1>
. For
example, if <value expr 1>
is an INTEGER column
and <value expr 2>
is a DOUBLE constant, the
return type is cast into INTEGER. This 機能(する)/行事 is 類似の to IFNULL.
(HyperSQL)
NVL2
NVL2( <value expr 1>, <value expr 2>, <value
expr 3> )
If <value expr 1>
is not null, returns
<value expr 2>
, さもなければ returns
<value expr 3>
. The type of the return value is
the type of <value expr 2>
unless it is null.
(HyperSQL)
UUID
UUID ( [ { <char value expr> | <binary value
expr> } ] )
With no parameter, this 機能(する)/行事 returns a new UUID value as a 16-byte binary value in the UUID type. With a UUID hexadecimal string argument, it returns the 16-byte binary value in UUID. With a 16-byte binary or UUID argument, it returns the formatted UUID character 代表. 公式文書,認める UUID is a type derived from BINARY(16) that in 代表するd as a hexadecimal character string with the 要求するd hyphens. (HyperSQL)
NEWID
NEWID ()
This is a synonym for the no-arg UUID 機能(する)/行事 in MSS compatibility 方式. (HyperSQL)
SYS_GUID
SYS_GUID ()
Returns a UUID value as a 16 byte binary value in ORA compatibility 方式. (HyperSQL)
CRYPT_KEY
CRYPT_KEY( <value expr 1>, <value expr 2>
)
Returns a binary string 代表 of a 無作為の cryptography 重要な
for the given cipher and cryptography provider. The cipher specification
is 明示するd by <value expr 1>
and the provider
by <value expr 2>
. To use the default provider,
明示する null for <value expr 2>
.
(HyperSQL)
DIAGNOSTICS
DIAGNOSTICS ( ROW_COUNT )
This is a convenience 機能(する)/行事 for use instead of the GET
DIAGNOSTICS ...
声明. The argument 明示するs the 指名する of
the diagnostics variable. 現在/一般に the only supported variable is the
ROW_COUNT
variable. The 機能(する)/行事 returns the 列/漕ぐ/騒動 count
returned by the last 遂行する/発効させるd 声明. The return value is 0 after most
声明s. Calling this 機能(する)/行事 すぐに after 遂行する/発効させるing an INSERT,
UPDATE, DELETE or MERGE 声明 returns the 列/漕ぐ/騒動 count for the last
声明, as it is returned by the JDBC 声明. (HyperSQL)
IDENTITY
IDENTITY ()
Returns the last IDENTITY value 挿入するd into a 列/漕ぐ/騒動 by the 現在の 開会/開廷/会期. The 声明, CALL IDENTITY() can be made after an INSERT 声明 that 挿入するs a 列/漕ぐ/騒動 into a (米)棚上げする/(英)提議する with an IDENTITY column. The CALL IDENTITY() 声明 returns the last IDENTITY value that was 挿入するd into a (米)棚上げする/(英)提議する by the 現在の 開会/開廷/会期. Each 開会/開廷/会期 manages this 機能(する)/行事 call 分かれて and is not 影響する/感情d by 挿入するs in other 開会/開廷/会期s. The 声明 can be 遂行する/発効させるd as a direct 声明 or a 用意が出来ている 声明. (HyperSQL)
DATABASE
DATABASE ()
Returns the とじ込み/提出する 指名する (without directory (警察などへの)密告,告訴(状)) of the database. (JDBC)
DATABASE_NAME
DATABASE_NAME ()
Returns the database 指名する. This 指名する is a 16-character, uppercase string. It is 生成するd as a string based on the timestamp of the 創造 of the database, for example HSQLDB32438AEAFB. The 指名する can be redefined by an admin 使用者 but the new 指名する must be all uppercase and 16 characters long. This 指名する is used in スピードを出す/記録につける messages with 外部の logging 枠組みs. (HyperSQL)
DATABASE_VERSION
DATABASE_VERSION ()
Returns the 十分な 見解/翻訳/版 string for the database engine. For example, 2.7.4. (JDBC)
USER
USER ()
同等(の) to the SQL 機能(する)/行事 CURRENT_USER
.
(JDBC)
CURRENT_USER
CURRENT_USER
CURRENT_ROLE
CURRENT_ROLE
SESSION_USER
SESSION_USER
SYSTEM_USER
SYSTEM_USER
CURRENT_SCHEMA
CURRENT_SCHEMA
CURRENT_CATALOG
CURRENT_CATALOG
These 機能(する)/行事s return the 指名するd 現在の 開会/開廷/会期 せいにする. They are all SQL 基準 機能(する)/行事s.
The CURRENT_USER
is the 使用者 that connected to
the database, or a 使用者 subsequently 始める,決める by the SET
AUTHORIZATION
声明.
SESSION_USER
is the same as CURRENT_USER
SYSTEM_USER
is the 使用者 that connected to the
database. It is not changed with any 命令(する) until the 開会/開廷/会期 is
の近くにd.
CURRENT_SCHEMA
is default schema of the 使用者, or
a schema subsequently 始める,決める by the SET SCHEMA
命令(する).
CURRENT_CATALOG
is always the same within a given
HyperSQL database and 示すs the 指名する of the catalog.
IS_AUTOCOMMIT
IS_AUTOCOMMIT()
Returns TRUE if the 開会/開廷/会期 is in 自動車-commit 方式. (HyperSQL)
IS_READONLY_SESSION
IS_READONLY_SESSION()
Returns TRUE if the 開会/開廷/会期 is in read only 方式. (HyperSQL)
IS_READONLY_DATABASE
IS_READONLY_DATABASE()
Returns TRUE if the database is a read only database. (HyperSQL)
IS_READONLY_DATABASE_FILES
IS_READONLY_DATABASE_FILES()
Returns TRUE if the database is a read-only とじ込み/提出するs database. In this 肉親,親類d of database, it is possible to 修正する the data, but the changes are not 固執するd to the database とじ込み/提出するs. (HyperSQL)
ISOLATION_LEVEL
ISOLATION_LEVEL()
Returns the 現在の 処理/取引 孤立/分離 level for the 開会/開廷/会期. Returns either READ COMMITTED or SERIALIZABLE as a string. (HyperSQL)
SESSION_ID
SESSION_ID()
Returns the id of the 開会/開廷/会期 as a BIGINT value. Each 開会/開廷/会期 id is unique during the 操作の lifetime of the database. Id's are 再開するd after a shutdown and 再開する. (HyperSQL)
SESSION_ISOLATION_LEVEL
SESSION_ISOLATION_LEVEL()
Returns the default 処理/取引 孤立/分離 level for the 現在の 開会/開廷/会期. Returns either READ COMMITTED or SERIALIZABLE as a string. (HyperSQL)
DATABASE_ISOLATION_LEVEL
DATABASE_ISOLATION_LEVEL()
Returns the default 処理/取引 孤立/分離 level for the database. Returns either READ COMMITTED or SERIALIZABLE as a string. (HyperSQL)
TRANSACTION_SIZE
TRANSACTION_SIZE()
Returns the 列/漕ぐ/騒動 change count for the 現在の 処理/取引. Each 列/漕ぐ/騒動 change 代表するs a 列/漕ぐ/騒動 INSERT or a 列/漕ぐ/騒動 DELETE 操作/手術. There will be a pair of 列/漕ぐ/騒動 change 操作/手術s for each 列/漕ぐ/騒動 that is updated.
TRANSACTION_ID
TRANSACTION_ID()
Returns the 現在の 処理/取引 ID for the 開会/開廷/会期 as a BIGINT value. The database 持続するs a 全世界の incremental id which is 配分するd to new 処理/取引s and new 活動/戦闘s (声明 死刑執行s) in different 開会/開廷/会期s. This value is unique to the 現在の 処理/取引. (HyperSQL)
TRANSACTION_UTC
TRANSACTION_UTC()
Returns the 処理/取引 timestamp in UTC time zone for the 開会/開廷/会期. This timestamp is used in updates made to system-見解/翻訳/版d (米)棚上げする/(英)提議するs during the 処理/取引. (HyperSQL)
ACTION_ID
ACTION_ID()
Returns the 現在の 活動/戦闘 ID for the 開会/開廷/会期 as a BIGINT value. The database 持続するs a 全世界の incremental id which is 配分するd to new 処理/取引s and new 活動/戦闘s (声明 死刑執行s) in different 開会/開廷/会期s. This value is unique to the 現在の 活動/戦闘. (HyperSQL)
TRANSACTION_CONTROL
TRANSACTION_CONTROL()
Returns the 現在の 処理/取引 model for the database. Returns LOCKS, MVLOCKS or MVCC as a string. (HyperSQL)
LOB_ID
LOB_ID( <column 言及/関連> )
Returns 内部の ID of a 高く弓形に打ち返す as a BIGINT value. 高く弓形に打ち返す ID's are unique and never 再使用するd. The <column 言及/関連> is the 指名する of the column (or variable, or argument) which is a CLOB or BLOB. Returns null if the value is null. (HyperSQL)
ROWNUM
ROWNUM()
ROW_NUMBER
ROW_NUMBER() OVER()
Returns the 現在の 列/漕ぐ/騒動 number (from 1) 存在 過程d in a select
声明. This has the same semantics as the ROWNUM pseudo-column in ORA
syntax 方式, but can be used in any syntax 方式. The 機能(する)/行事 is used in a
SELECT or DELETE 声明. The ROWNUM of a 列/漕ぐ/騒動 is incremented as the 列/漕ぐ/騒動s
are 追加するd to the result 始める,決める. It is therefore possible to use a 条件
such as WHERE ROWNUM() < 10, but not ROWNUM() > 10 or ROWNUM = 10.
The ROW_NUMBER() OVER()
代案/選択肢 成し遂げるs the same
機能(する)/行事 and is 含むd for compatibility with other database
engines.(HyperSQL)
$Revision: 6787 $