Output the text
Is there a way i can output in SQL Oracle as follow with a single quote at the beginning and end, pl开发者_Python百科us a comma (,). Many thanks in advance!
original output:
Number
0910000001
0910000002
0910000003
0910000004
0910000018
0910000019
0910000020
Desired output:
Number
'0910000001',
'0910000002',
'0910000003',
'0910000004',
'0910000018',
'0910000019',
'0910000020',
You have to just add it you your query...
select ''' + number + ''' , ' ' as trailing_comma from table..
the second ' '
is so your output will insert a comma after your 'Number'
精彩评论