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.
我试图从 table1 中选择 * 名字,姓氏 = 'Joe Bloggs'
显然,名字和姓氏是表一中的 2 个不同列,但是当我运行此 SQL 代码时出现错误:
SELECT * from table1 where forename, surname = 'Joe Bloggs'
关于我能做什么的任何想法?
也许你的意思是
SELECT * from table1 where CONCAT_WS(' ',forename, surname) = 'Joe Bloggs'
或者
SELECT * from table1 where 'Joe Bloggs' IN (forename, surname)
SELECT * from table1 where forename = 'Joe' AND surname = 'Bloggs'