From: sChapman on
I have a table that can contain emtpy rows. Row is considered empty
when all the columns (except the primary) are NULLs. Is there a
function in Sql Server to test if a row is empty?
From: Uri Dimant on
Perhaps CASE Expression
SELECT CASE WHEN col IS NULL THEN 'empty' END col
.........
FROM tbl


"sChapman" <sumanthcp(a)googlemail.com> wrote in message
news:86f1cc36-53d5-40cf-a606-565c3540d037(a)a30g2000yqn.googlegroups.com...
>I have a table that can contain emtpy rows. Row is considered empty
> when all the columns (except the primary) are NULLs. Is there a
> function in Sql Server to test if a row is empty?


From: --CELKO-- on
>> Is there a function in SQL Server to test if a row is empty? <<

No, you have to test column by column. However, such a table is
usually a sign of really bad design. It is almost always better to
have DEFAULT clauses and to use the little-known "INSERT INTO..
DEFAULT VALUES;" when appropriate.