Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

how to select null values and restrict '0' values

$
0
0

Hi all,

 I have a query to select column values having NULL and restrict data having 0..

i have a table name invoice with column number , having values 1,0,8,15,'DEBIT',"CREDIT',NULL and many int values

now i need to write a select query to get data of not having number in (0,'DEBIT','CREDIT')

i wrote it as

select * from invoice

where number <>'0' and number <>'DEBIT' and number <>'CREDIT'

but it gives only rows with number 1,8,15 its not giving data for NULL

how can i acheive this..please help

thanx in advance..


lucky



Viewing all articles
Browse latest Browse all 5123

Latest Images

Trending Articles



Latest Images

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