开发者

How to display query result in a particular format

开发者 https://www.devze.com 2023-03-02 16:10 出处:网络
I have two columns named FirstName and LastName. I want to query these from the table and display them in the format \"FirstNameLastName\" (Note there is a space between FirstName and LastName) under

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

How to display query result in a particular format

and the result comes like this

How to display query result in a particular format

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
0

精彩评论

暂无评论...
验证码 换一张
取 消