关于SQL参数问题
SQL:SELECT * FROM A WHERE A.A001=@A001 UNION ALL SELECT * FROM A AS B WHERE B.001=@A001 AND B.002='200901'
sqlparameter para = new sqlparameter("@A001",SqlDbType.Char,8);
para.value='aaa';
问题是:上面的SQL语句两次用到参数@A001,设置参数时只用一个参数还是要分开两个参数??
------解决方案--------------------反正一样的,就用1个有问题吗?
------解决方案--------------------无所谓