SqlServer 取别名的字段出现在where条件里面
--直接把该表包裹,,然后重新查询一遍
SELECT * FROM (SELECT TOP 100 '2022' AS date1, * FROM AOI_MAT_LOT) as AOI_MAT_LOT WHERE date1 = '2022'
--直接把该表包裹,,然后重新查询一遍
SELECT * FROM (SELECT TOP 100 '2022' AS date1, * FROM AOI_MAT_LOT) as AOI_MAT_LOT WHERE date1 = '2022'