Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Applies to:
Databricks SQL
Databricks Runtime
Returns expr bitwise unsigned right shifted by n bits. This function is a synonym for >>> (gt gt gt sign) operator.
Syntax
shiftrightunsigned(expr, n)
Arguments
expr: AnINTEGERorBIGINTexpression.n: AnINTEGERexpression specifying the number of bits to shift.
Returns
The result type matches expr.
The effective shift distance is n modulo 32 for an INTEGER expr and modulo 64 for a BIGINT expr.
Examples
> SELECT shiftrightunsigned(4, 1);
2
> SELECT shiftrightunsigned(-4, 1);
2147483646
> SELECT shiftrightunsigned(1, -1);
0
> SELECT 4 >>> 1;
2
> SELECT -4 >>> 1;
2147483646