- Creating a custom column use the keyword CONCAT -SELECT CONCAT(city,',',state) FROM customers
- Give name to the new custom column -SELECT CONCAT(city,',',state) AS new_info FROM customers
Notice:
- Full form of CONCAT is Concatenation; it takes a list of items and combine those items in a single place.
- When you will go to name a new custom column if there is more than one name inside the parenthesis then use ,',', marks between the existing column names like I showed in the example.
- For giving name to the new custom column use statement AS before the name.
0 comments:
Post a Comment