Key points for ms sql server as professional DB Developer
Microsoft Net Framework

Key points for ms sql server as professional DB Developer

1- Use IsNull to set default value of amount,date
    e.g ISNULL(ReturnAgentInfo,0) AS agentinfo
2- Don’t use the + operator to concatenate the expressions
3- Avoid the risk of the divide by zero error

e.g
    SELECT ProductName
  , Price
  , (Price / NULLIF(PriceTax,0)) * 100 AS [PriceTaxRatio]
FROM Products

3- Counting SQL NULL values

 SELECT COUNT(ISNULL(ProductName,'')) AS 'Number Of Product' FROM Products
4- avoide conversion in where clause

Share This with your friend by choosing any social account


Upcoming Articles
You may also read following recent Post
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM