I would like to know if it is possible to concat and add a space in SQlite. This is what I mean:
SELECT NAME || SURNAME AS USER_NAME FROM USERS
But then add something to the query to let the result be displayed as:
Name Surname
and not
NameSurname
Is something like this possible in SQlite?
The SQL standard provides the CONCAT() function to concatenate two strings into a single string. SQLite, however, does not support the CONCAT() function. Instead, it uses the concatenate operator ( || ) to join two strings into one.
Description. The SQLite || operator allows you to concatenate 2 or more strings together.
CONCAT() function in MySQL is used to concatenating the given arguments. It may have one or more arguments. If all arguments are nonbinary strings, the result is a nonbinary string. If the arguments include any binary strings, the result is a binary string.
Concat also the space:
SELECT NAME || ' ' || SURNAME AS USER_NAME FROM USERS
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With