Blockquote
Using concatenation in Oracle SQL is very simple and interesting. But I donβt know much about MS-SQL.
Blockquote
Here we are looking for Oracle: Syntax: SQL> select First_name||Last_Name as Employee from employees;
Result: EMPLOYEE
EllenAbel SundarAnde MozheAtkinson
Here AS: a keyword used as an alias. We can combine null values. for example: columnm1 || Null
Suppose any of your columns contains a NULL value, then the result will only show the value of that column that has a value.
You can also use a literal string of characters in concatenation.
eg. select column1||' is a '||column2 from tableName; Result: column1 - column2. between the literal letters must be written in single quotes. you cna exclude numbers.
NOTE This applies only to oracle // SQL server.
Suraj shrivastava
source share