• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 400
  • Last Modified:

Appending singe quotes both sides to a varchar data type

i have varchar datatype variable
lets say  abc
how to convert  abc as 'abc' with some operations(arithmatic or any)
1 Solution
Would this work?
SELECT '''' & fieldname & ''''
FROM tablename
or alternatively
SELECT CONCAT('''',fieldname,'''')
  FROM tablename  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now