Hello I am working on a very simple query, this query is suppose to delete all the null rows on my table, I have it this is my query
DELETE FROM myTable WHERE myID IS NULL;
But I wanted to include this query on a store procedure, this time I want to remove all the null values from two tables in just one query this is my progress:
DELETE tblOg.myID, TblOrd.myID
FROM myTbl tblOg,
myTblOrdered TblOrd
WHERE myTbl.myID IS NULL AND myTblOrdered.myID IS NULL;
But I got this error
Msg 102, Level 15, State 1, Line 7 Incorrect syntax near 'TblOrd'.
Not sure if I should use a INNER JOIN
or where should I put it.
Thanks in advance.