Artur Stolc
Artur Stolc

Reputation: 41

SQL column name with comma

im creating a csv file from sql and i must have column title name with comma like:

id,name,company
1,ART,Oracle

select ( id || ',' || name || ',' || company ) as **????????** from emplo

is there any way to display a sql column title with commas?

Upvotes: 1

Views: 4438

Answers (2)

D-Shih
D-Shih

Reputation: 46219

use " to contain your column name.

select ( id || ',' || name || ',' || company )  "id,name,company" 
from emplo

Upvotes: 2

Steve Mansfield
Steve Mansfield

Reputation: 41

Not sure what the reason for having a comma in column name, but its likely to only cause problems in parsing SQL statements in the future.

Check this document out...

https://docs.oracle.com/cd/B19306_01/server.102/b14200/sql_elements008.htm

Upvotes: 0

Related Questions