Postgresql流水帐(第二天): Value Expressions

it2022-05-09  168

A value expression is one of the following:

A constant or literal value A column reference A positional parameter reference, in the body of a function definition or prepared statement A subscripted expression A field selection expression An operator invocation A function call An aggregate expression A window function call A type cast A collation expression A scalar subquery An array constructor A row constructor Another value expression in parentheses (used to group subexpressions and override precedence)

Column References(列引用)

correlation.columnname     users.username

 

Positional Parameters(位置参数, 同 BASH )

For example, consider the definition of a function, dept, as:

CREATE FUNCTION dept(text) RETURNS dept

AS $$ SELECT * FROM dept WHERE name = $1 $$

LANGUAGE SQL;

$1 表示参数里的第一个参数。

Subscripts, 有点像python 列表切片

expression[subscript]

Operator Invocations

Function Calls

function_name ([expression [, expression ... ]] ) sqrt(2)

 

似懂非懂,不继续流了 J J J

 

 

转载于:https://www.cnblogs.com/songlihong/p/5368511.html

相关资源:七夕情人节表白HTML源码(两款)

最新回复(0)