Reputation: 1111
How can I concatenate two fields from two different tables in SQLite?
Say I have:
Id Name
---------- ------
1 John
2 Doe
Id Name
---------- ------
1 SchoolA
2 SchoolB
Expected Output
Id Name
---------- ------
1 John-SchoolA
2 Doe-SchoolB
NB: Both tables have the same Ids.
Updated:
Table 1
Id Name
---- -------
1 John
2 Doe
Table 2
Table1_id Name
--------- ------
1 SchoolA
2 SchoolB
NB: Both tables have the same Ids (in terms of value).
Upvotes: 2
Views: 539