开发者

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'

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜