Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
样本:
ID firstname lastname 1 jerry cai
我得到一个字符串“jerrycai”,我需要从这两个字段中选择一次并将它们组合起来,然后与“jerrycai”进行比较。
只是猜测以下可能有效:
select * from user where firstname+lastname='jerrycai'
有没有在 SQL 中实现这个的方法?数据库:访问
当你可以这样做时为什么要连接:
select * from user where firstname = 'jerry' AND lastname = 'cai';
但如果你必须:
select * from user where firstname & lastname = 'jerrycai';