电子邮件属于表格预订,在Microsoft sql server中定义为"文本"类型
SELECT email,
COUNT(email) AS NumOccurrences
FROM Booking
GROUP BY email
HAVING ( COUNT(email) > 1 )
Run Code Online (Sandbox Code Playgroud)
运行上述查询后(尝试在预订中查找重复的电子邮件),我收到如下错误消息:
除非使用IS NULL或LIKE运算符,否则无法比较或排序text,ntext和image数据类型.
我正在使用Microsoft Sql