Question: I delete a code block in Jupyter Lab accidentally. Can I find it back?

Answer: 
By far no SQL expert here, but you could transform the table into an XML, mark all NULL valued columns as nil-elements and then filter out all rows which only have nil-elements besides the column id.

```
--Glorious test table with an amazing amount of three columns..
declare @tTable table ([id] int, [c1] varchar(10), [c2] bit);
insert into @tTable values
    (1, 'wayne', null),
    (2, null, 1),
    (3, null, null), --This one goes
    (4, null, 0),
    (5, '', null),
    (7, null, null); --This one goes;

--Transform table to XML marking NULL values with @nil..
declare @tXML xml; set @tXML = (
    select
        *
    from
        @tTable
    for xml path('row'), type, elements xsinil
);

--Removes all [id] contained in the select below..
delete from @tTable where [id] in (
    --Select all [id] which have no element NOT being marked as NULL (=merely NULL values)
    select
        p.value('./id[1]', 'int')
    from
        (select 1 as [wayne]) as [tT]
        cross apply @tXML.nodes('/row') as t(p)
    where
        (
            p.exist('./*[not(local-name(.)="id")][not(@xsi:nil)]') = 0
        )
);

select * from @tTable;

```
You can simply run below query for your requirement. It will delete all rows having NULL values(Except ID) COLUMN

```
DECLARE @TSchema SYSNAME
       ,@TName SYSNAME

SELECT @TSchema = 'dbo'
      ,@TName = 'yourTableName';

DECLARE @TSQLStatement NVARCHAR(MAX);

SET @TSQLStatement = 'DELETE FROM '  + @TSchema + '.' + @TName + ' WHERE ' +  STUFF
(
    (
        SELECT ' AND ' + [name] + ' IS NULL' 
        FROM [sys].[columns] 
        WHERE [object_id] = OBJECT_ID(@TSchema + '.' + @TName)
            AND [column_id] NOT IN
            (
                SELECT IC.[column_id] FROM [sys].[indexes] I
                INNER JOIN [sys].[index_columns] IC ON I.[object_id] = IC.[object_id]
             AND I.[index_id] = IC.[index_id]
                WHERE I.[type] = 1
                    AND I.[object_id] =  OBJECT_ID(@TSchema + '.' + @TName)
            )AND name <> 'id'
        FOR XML PATH(''), TYPE
    ).value('.', 'NVARCHAR(MAX)')
    ,1
    ,5
    ,''
);

EXEC sp_executesql @TSQLStatement;

```

Feel free for any query.