I have two columns named FirstName and LastName. I want to query these from the table and display them in the format "FirstName LastName" (Note there is a space between FirstName and LastName) under the same c开发者_开发百科olumn.
Edit 1
I tried this
and the result comes like this
Why am I getting 0's ?
The string concatenation operator in SQLite appears to be ||
. So (assuming that the columns are both NOT NULL
-able)
SELECT FirstName || ' ' || LastName FROM Users
SELECT FirstName + ' ' + LastName FROM Users
select FirstName + ' ' + LastName as FullName
from SomeTable
精彩评论