Sybase里对"和'是不是不敏感?
<P>Sybase里,sql语句中用 ' 和 " 有什么区别?</P><P>谢谢!</P> <P>没注意过,不过PB里好象有区别的~~</P>
<P>至少组对的时候要同样的一组。</P> <DIV class=quote><B>以下是引用<I>hecal</I>在2005-11-7 19:15:04的发言:</B><BR>
<P>Sybase里,sql语句中用 ' 和 " 有什么区别?</P>
<P>谢谢!</P></DIV>
<P>
<P>???</P>
<P>没看懂你的问题耶?</P>
<P>能不能说清楚一点?</P> <P>比如下面的sql语句:</P>
<P>select tr_memup.USERS_CORP_CD, USERS_SHOP_CD, tr_memup.USERS_MACHINE_CD,<BR>CORP_NM, tr_memup.CORP_J, CORP_TEL, CORP_ZIP, <BR>from tr_memup, mt_deal, mt_reason, mt_industry, mt_account,<BR>mt_machine, mt_corp<BR>where NEW_SEQ_NO = '12345'<BR>and tr_memup.USERS_CORP_CD = mt_corp.CORP_CD(+)<BR>and tr_memup.REASON_CD = mt_reason.REASON_CD(+)<BR>and tr_memup.ACCOUNT_TYPE_CD = mt_account.ACCOUNT_CD(+)<BR>and tr_memup.DEAL_CD = mt_deal.DEAL_CD(+)<BR>and tr_memup.INDUSTRY_CD = mt_industry.INDUSTRY_CD(+)<BR>and tr_memup.USERS_CORP_CD = mt_machine.USERS_CORP_CD(+)<BR>and tr_memup.USERS_MACHINE_CD = mt_machine.USERS_MACHINE_CD(+)</P>
<P>其中的NEW_SEQ_NO = '12345'用NEW_SEQ_NO = "12345"来代替是否一样?<BR><BR></P> 我习惯用"的,一般不用'的 <P>有很大的区别,在PB中,where 语名中只认'',而不认"",</P>
<P>应该是与SQL一致的。</P> <P>好象没区别</P>
<P>我用了这么多年,没啥问题</P> <DIV class=quote><B>以下是引用<I>hecal</I>在2005-11-10 13:49:05的发言:</B><BR>
<P>比如下面的sql语句:</P>
<P>select tr_memup.USERS_CORP_CD, USERS_SHOP_CD, tr_memup.USERS_MACHINE_CD,<BR>CORP_NM, tr_memup.CORP_J, CORP_TEL, CORP_ZIP, <BR>from tr_memup, mt_deal, mt_reason, mt_industry, mt_account,<BR>mt_machine, mt_corp<BR>where NEW_SEQ_NO = '12345'<BR>and tr_memup.USERS_CORP_CD = mt_corp.CORP_CD(+)<BR>and tr_memup.REASON_CD = mt_reason.REASON_CD(+)<BR>and tr_memup.ACCOUNT_TYPE_CD = mt_account.ACCOUNT_CD(+)<BR>and tr_memup.DEAL_CD = mt_deal.DEAL_CD(+)<BR>and tr_memup.INDUSTRY_CD = mt_industry.INDUSTRY_CD(+)<BR>and tr_memup.USERS_CORP_CD = mt_machine.USERS_CORP_CD(+)<BR>and tr_memup.USERS_MACHINE_CD = mt_machine.USERS_MACHINE_CD(+)</P>
<P>其中的NEW_SEQ_NO = '12345'用NEW_SEQ_NO = "12345"来代替是否一样?<BR><BR></P></DIV>
<p>没问题的!!! <P>谢谢各位,但是对"和'在sql server和oracle中是敏感的。在oracle中只能采用'才可以。</P>
页:
[1]