Mar 122013
 

Escaping an apostrophe or a quote in MySQL can be done by putting a \ (backslash) in front of them.

Example: insert into tablename (columnname) values ('It\'s time to eat.');

Escaping an apostrophe or quote in MSSQL can be done by doubling up the apostrophe or quote.

Example: insert into tablename (columnname) values ('It''s time to eat.');
Source: from