Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 null value

Author  Topic 

sravanim
Yak Posting Veteran

58 Posts

Posted - 2013-12-16 : 02:02:06
How to find if there is any null value in our table?

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-12-16 : 02:12:08
To check NULL value in a column
SELECT * FROM TableName
WHERE ColumnName IS NULL

--
Chandu
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-12-16 : 04:04:04
quote:
Originally posted by sravanim

How to find if there is any null value in our table?


you mean null values in all columns consolidated? or rows with atleast 1 null values?
How many nullable columns are there in the table?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

sravanim
Yak Posting Veteran

58 Posts

Posted - 2013-12-16 : 08:30:52
How to hardcode null values in sqlserver
Go to Top of Page

djj55
Constraint Violating Yak Guru

352 Posts

Posted - 2013-12-16 : 08:48:24
SELECT NULL AS ABC


djj
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2013-12-16 : 10:22:38
quote:
Originally posted by sravanim

How to hardcode null values in sqlserver


like below

INSERT Table(Column,..)
VALUES(NULL,...)

INSERT Table(column..)
SELECT NULL,..
FROM table2
...

etc

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -