Insert multiple null values ​​into sql table

advertisements

I want to insert multiple null values in a sql table.Can some body help in the below query

UPDATE PDetail
SET rText = null AND ctnumber = null AND ptext = null
WHERE rText = 'For help' OR ctnumber = '123654789'  

INSERT INTO PDetail (rText,ctnumber,ptext) VALUES (NULL,NULL,NULL)
WHERE rText = 'For help' OR ctnumber = '123654789'


You need to update values, not insert since you are changing values for already existing records in your table using a where condition in your query. do something as follows ...

UPDATE PDetail
SET rText    = null
   ,ctnumber = null
   ,ptext    = null
WHERE  rText = 'For help'
OR     ctnumber = '123654789'