Using a string with single quotes in a table I'm trying to insert the following string, as written, into a table:

'affinity mask', 0

However I can't figure out how exactly I need to escape the quotes. It always wants to treat the , 0 as a separate column.

How can I escape the comma properly?
You need to double-up apostrophes to embed them within a string, since they also serve as string delimiters:

INSERT dbo.table(column) VALUES('''affinity mask'',0');