Informatics Practices
What will be the output of following code ?
mysql> SELECT CONCAT(CONCAT('Inform', 'atics'), 'Practices');
Answer
+------------------------------------------------+
| CONCAT(CONCAT('Inform', 'atics'), 'Practices') |
+------------------------------------------------+
| InformaticsPractices |
+------------------------------------------------+
Working
The CONCAT()
function in SQL is used to concatenate two or more strings into a single string. In this query, the inner CONCAT('Inform', 'atics')
concatenates 'Inform' and 'atics' to produce 'Informatics'. The outer CONCAT()
then concatenates 'Informatics' with 'Practices' to produce 'InformaticsPractices'. Therefore, the final output is 'InformaticsPractices'.