Reputation: 31
Trying to select data from a table whereby the where clause combines two fields to locate the specific data to be fetched. The code below does not work.
Select Email from users where FirstName || ' ' || LastName AS Nominative == 'fjpsojp 09809'
Upvotes: 1
Views: 576
Reputation: 321
If the fields Email, FirstName and LastName are in the Users table, then you can do your select like this:
select Email, FirstName || ' ' || LastName as Nominative
from users
where FirstName = 'fjpsojp'
and LastName = '09809';
This will give you results with two columns: one for Email, another for Nominative
Upvotes: 3