2
如何將此MySQL查詢放入SQL Server等效項中?將IF從子句從MySQL移植到SQL Server 2005中
SELECT User.id, User.first, User.last,
IF (User.first = q1 OR User.first = q2, 1, 0) +
IF (User.last = q1 OR User.last = q2, 1, 0) as points
FROM users as User
ORDER BY points DESC