You can also use the 'alternative quoting mechanism' syntax:
INSERT INTO TIZ_VADF_TL_MODELS (name)
VALUES (q'[xxx'test'yy]');
The pair of characters immediately inside the first set of quotes, []
in this case, delimit the quoted text; single quotes within those do not have to be escaped. Of course, you can't then have ]'
within the string itself, but you can pick your own delimiters so that can be avoided if it's going to be an issue; ]
on its own would still be OK.
This can be simpler than making sure single quotes are escaped, which can get a bit messy, or at least hard to read and debug.
SQL Fiddle.