문제

I am working with web sql. I have built many tables and trying to get data from the database. Problem is that when is try to combine two columns it returns 0 in that column.

(t1.team_name+' '+t2.team_name) AS "Teams"

or

 CONCAT(t1.team_name,' ',t2.team_name) AS "Teams"

These do not work. Am i doing something wrong because separately they return the text.

도움이 되었습니까?

해결책

In SQLite (which I belive Web SQL is based on) you can concatenate strings with ||so try this:

t1.team_name || ' ' || t2.team_name AS "Teams"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top