nvarchar查询条件中不用加单引号''吗?

DataSet ds = wikibll.GetList(7, 1, string.Format(" isshow=1 and AskCountryid={0} ", countryid));

AskCountryid在sqlserver2005中是nvarchar(50),但是查询条件中不用加单引号''吗?好神奇!!

居然这样写是对的~

用心写代码,不辜负程序员之名。
原文地址:https://www.cnblogs.com/thinkingthigh/p/3054538.html