參數
參數是查詢編譯後提供的值的佔位符。
它使用以下語法:$id,其中 id 是任意英數字元字串。
大多數資料庫引擎只支援數字位置參數 ID(例如 $3)。
PRQL
from employees
filter id == $1
SQL
SELECT
*
FROM
employees
WHERE
id = $1
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
參數是查詢編譯後提供的值的佔位符。
它使用以下語法:$id,其中 id 是任意英數字元字串。
大多數資料庫引擎只支援數字位置參數 ID(例如 $3)。
from employees
filter id == $1
SELECT
*
FROM
employees
WHERE
id = $1