Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

how to select null and is not null value from table?

$
0
0

hi all 

i have a product table ...

SELECT TOP 1000 [ProductId]
      ,[IsProduct]
      ,[StoragesRef]
      ,[UnitRef]
      ,[ProductName]
      ,[HasPrice]
      ,[Comment]
  FROM [dbo].[Product]    p

and get this values...

now i want select by this code ...

SELECT * FROM Product   WHERE ProductId=15 AND StoragesRef = 50001 OR Product.StoragesRef  IS NULL

i get this value ...

this value is not normal 

how to solve it 

please help me

thanks


Name of Allah, Most Gracious, Most Merciful and He created the human


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>