In SQL Server, shift operators are not present as per knowledge.
If I have to achieve right shift and left shift, what will be the efficient way of doing it?
OR
Please suggest which one will be the more efficient way of doing it.
From SQL Server 2022 you can simply use
LEFT_SHIFT ( expression_value, shift_amount )
(or <<
)RIGHT_SHIFT ( expression_value, shift_amount )
(or >>
)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With