删除SQL语句中的WHERE子句

时间:2017-07-20 06:53:57

标签: c#

我有一个要求,我想删除SQL查询字符串中的WHERE子句。例如:

Select Name From Table Where ID=@ID

输出:

Select Name From Table

在某些情况下,SQL包含Group ByOrder By

示例:

Select Name From Table Where SomeField=@SomeField Group By Name Order By Name

输出:

Select Name From Table Group By Name Order By Name

0 个答案:

没有答案