Share via


shiftrightunsigned 函式

適用于: check marked yes Databricks SQL check marked yes Databricks Runtime

傳回位不帶正負號的右移位 n

語法

shiftrightunsigned(expr, n)

引數

  • exprINTEGER:或 BIGINT 運算式。
  • nINTEGER:指定要移位數目的運算式。

傳回

結果類型符合 expr

當 為負數時 n ,結果為 0。

範例

> SELECT shiftrightunsigned(4, 1);
 2
> SELECT shiftrightunsigned(-4, 1);
 2147483646