How To Use Operator Precedence In MSSQL Database Server Tutorial Example
Run microsoft sql server management studio query editor or any client tools you like then copy & paste the below code to use operator precedence on arithmetic operators in select clause on sql command or statement in MSSQL Database Server Tutorial Example
-- Northwind SELECT TOP 2 ProductName,UnitPrice,2*UnitPrice+10 FROM Products SELECT TOP 2 ProductName,UnitPrice,2*(UnitPrice+10) FROM Products SELECT TOP 2 ProductName,UnitPrice,(2*UnitPrice)+10 FROM Products
Make sure that you have "Northwind" sample database available. /* */ is multiline code comments in MSSQL -- is comment in MSSQL -- in fact it is comment in Oracle and MySQL as well

No comments:
Post a Comment
leave your comments here..