I'm trying to list all users beginning with a letter, eg D
Would the following be the right method of doing this.
Select concat(firstname, '',lastname) from users where concat(lastname) = "D*"
我会尝试:
select * from users where lastname like 'D%';
For getting list starting with eg: "D":
SELECT concat(firstname, '',lastname) FROM users WHERE LEFT((concat(firstname, '',lastname)),1)= 'D';
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.