C# SQL 查询:使用 LIKE 语句进行模糊匹配
string query = 'SELECT mo_no FROM mf_mo WHERE sta_dd = @selectedDate and dep like '%' + @dep + '%''; SqlCommand command = new SqlCommand(query, connection); command.Parameters.AddWithValue('@selectedDate', selectedDate); command.Parameters.AddWithValue('@dep', depValue);
原文地址: https://www.cveoy.top/t/topic/qqik 著作权归作者所有。请勿转载和采集!