关于SUBSTRING函数的一点问想请教大家
select bargain_name,bargain_owner_IdCard from t_bargain where bargain_owner_IdCard=(SELECT SUBSTRING(bargain_owner_IdCard, 0, 18) FROM dbo.t_bargain where bargain_name = '200900010')上面的查询没有结果,但SELECT SUBSTRING(bargain_owner_IdCard, 0, 18)FROM dbo.t_bargain where bargain_name = '200900010' 是有结果的:362502197505180816。请教大家substring函数在sql语句中的用法规则是怎样的。