In mysqlyou can use the function concat():
SELECT CONCAT("'", CNAME, "'") FROM yourTable
In oracleyou can use the same function as above concat()or concatenation operator:
SELECT '''' || CNAME || '''' FROM yourTable;
SELECT CONCAT('''', CNAME, '''') FROM yourTable;
source
share