开发者

Output the text

开发者 https://www.devze.com 2023-01-21 02:36 出处:网络
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!

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

精彩评论

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