下面语句,什么时候会输出 "等于"
if '当' = '单'  print '等于'
呵呵... ... 

解决方案 »

  1.   

    沙发 顶   晕乎……‘dang’ like ‘%dan%’?
      

  2.   

    if soundex('单')=soundex('当')
    print '等于'----
    等于
      

  3.   

    if '当'='单'
    begin
    print '等于'
    end 
    else
    begin
    print '不等于'
    end不等于
      

  4.   

    if '当' = '单'  print '等于'
    else print '等于'
      

  5.   

    if '当' = '单'  print '等于'
    /*
    等于*/select @@version
    /*
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Microsoft SQL Server 2005 - 9.00.4035.00 (Intel X86) 
    Nov 24 2008 13:01:59 
    Copyright (c) 1988-2005 Microsoft Corporation
    Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
    */
      

  6.   

    if '当' = '单'  print '等于'
    /*
    等于
    */
      

  7.   

    各位如果已经知道答案或者想通了的,暂时不要贴解释哦.不是脑筋急转弯,也不是恶搞,也不是出错的情况下就是正常执行SQL
    散分活动,100楼贴解释呵呵~~~ 
      

  8.   


    if '当' = '单'  print '等于'
    else
     print '等于'
      

  9.   

    简体如果在繁体里,很多字会显示成 ?
    而 ? 在sql里 ascii('?') = 63所以大部分的简体字(如果和繁体不一样的),都会是 63
    select ascii('?'),ascii('实'),ascii('当') , ascii('单')  ,ascii('备'),ascii('学') 
      

  10.   

    create database test1 
    USE [master]
    GO
    ALTER DATABASE test1 COLLATE SQL_Latin1_General_CP1_CI_AS
    GOuse [test1]if '当' = '单'  print n'等于'
      

  11.   


    晕了,我以为是C#。。原来是SQL
      

  12.   

    Hi,
     0)Current COLLATE
     
    SELECT DATABASEPROPERTYEX('Testshenliang', 'Collation')-------------------------------
    Chinese_PRC_CI_AS(1 row(s) affected)
    1)Chaning To Chinese_Taiwan_Stroke_BINUSE MASTER
    GO
    ALTER DATABASE Testshenliang COLLATE Chinese_Taiwan_Stroke_BIN2)Query USE Testshenliang
    GO
    IF '当' = '单'  
    PRINT '等于'
    ELSE
    PRINT '不等于'--Result等于3)Geting BackALTER DATABASE Testshenliang COLLATE Chinese_PRC_CI_AS4)See ALL COLLATIONS IN MS SQL SELECT *
    FROM fn_helpcollations()
      

  13.   

    难道是要修改SQL SERVER的默认语言,以及相关的设置?
      

  14.   

    淫荡的顶贴.答案就是不支持 简体编码字符集 的 MS SQL Sever 环境下,该语句成立.
    解释楼上的楼上... 32楼给出了.
    因为其不支持简体编码字库,那么这两个字都相当于 ?  , 而 ? == ? 所以... ... 呵呵
      

  15.   

    排序规则的问题。
    Chinese_PRC_CI_AI
      

  16.   

    “单”=“dan”~
    “当”=‘dang’
    是不是取前3位啊~
    这样就等于啦~
    自己瞎想的~
      

  17.   

    if '当' <> '单'  print '等于'