我有下面的查询。我想接收不包含mywebsite.com/url
但包括mywebsite.comurl
的记录:
SELECT COUNT(*)
FROM [mydb].[dbo].[mytable]
WHERE No is not null
AND Thumbnail is not null
AND Thumbnail not like '<a target=\"_blank\" href=\"http://www.mywebsite.com/%'
当我运行查询时,它会给我一个意外的数字。查询有什么问题,如何使其正常工作?
答案 0 :(得分:3)
SELECT COUNT(*) FROM [mydb].[dbo].[mytable] WHERE No is not null
AND Thumbnail is not null
AND Thumbnail like '%mywebsite.com%'
AND Thumbnail not like '%mywebsite.com/url%'