on 05-16-2019 4:46 PM
Hello all,
How to Replace multiple occurrence of space in column names to underscore
Column names:
Effective date time
Expected : Effective_date_time
BR
Nagendra
Simply use REPLACE function:
SELECT REPLACE('Effective date time',' ', '_') AS UNDERSCORE_COL FROM DUMMY;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I read your question again and now realized that you are asking about column names. So you can simply add alias and put desired column name:
SELECT
"Effective date time" AS "Effective_date_time"
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.