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.
我正在尝试获取至少 1950 年生日的人的姓名。
SELECT Person.names... ..WHERE SELECT EXTRACT(YEAR FROM Person.dateOfBirth) => 1950;
这个查询有什么问题?
该YEAR()函数将从DATETIMEMySQL 中的字段返回年份作为整数。
YEAR()
DATETIME
SELECT Person.names FROM Person WHERE YEAR(Person.dateOfBirth) >= 1950;