两个问题恐怕都实现不了,
up

解决方案 »

  1.   

    2,
    Assuming that you want to check a 4 character field to see if it has 'teST' in it (and you don't want to return values of 'test', 'TEST' etc.)select * from 
    where convert(varbinary(4), ) = convert (varbinary(4), 'teST')
    Note that if the to be tested is a Unicode datatype (e.g. nchar) then you have to double its length when converting to varbinary, and CAST the literal as a Unicode datatype as well:select * from 
    where convert(varbinary(8), ) = convert (varbinary(8), CAST('teST' AS nchar(4)))
    To compare between tablesselect * from , 
    where = 
    and convert(varbinary(4), ) = convert (varbinary(4), )The reason for having the two comparisons here is so that any indices will still be used. They won't be used just with a comparison that uses convert.
      

  2.   

    关注我没有听说过还有这方法
      

  3.   

    可以自己在程序中用加密算法对密码进行加密,使用时再解密。
      

  4.   

    谢谢大家的帮助:)第2个问题已经解决