只要求在SQL SERVER中保存大写字母的函数是什么?急急急

解决方案 »

  1.   

    UPPER (T-SQL)
    Returns a character expression with lowercase character data converted to uppercase.Syntax
    UPPER(character_expression)Arguments
    character_expression 
    Is an expression of character data. character_expression can be a constant, variable, or column of either character or binary data. 
    Return Types
    varcharRes
    character_expression must be of a data type that is implicitly convertible to varchar. Otherwise, use the CAST function to explicitly convert character_expression.Examples
    This example uses the UPPER and RTRIM functions to return the trimmed, uppercase author’s last name concatenated with the author’s first name.USE pubsGOSELECT UPPER(RTRIM(au_lname)) + ', ' + au_fname AS NameFROM authorsORDER BY au_lnameGO  Here is the result set:Name                                                           -------------------------------------------------------------- BENNET, Abraham                                                BLOTCHET-HALLS, Reginald                                       CARSON, Cheryl                                                 DEFRANCE, Michel                                               DEL CASTILLO, Innes                                            DULL, Ann                                                      GREEN, Marjorie                                                GREENE, Morningstar                                            GRINGLESBY, Burt                                               HUNTER, Sheryl                                                 KARSEN, Livia                                                  LOCKSLEY, Charlene                                             MACFEATHER, Stearns                                            MCBADDEN, Heather                                              O'LEARY, Michael                                               PANTELEY, Sylvia                                               RINGER, Albert                                                 RINGER, Anne                                                   SMITH, Meander                                                 STRAIGHT, Dean                                                 STRINGER, Dirk                                                 WHITE, Johnson                                                 YOKOMOTO, Akiko                                                  (23 row(s) affected)  
      

  2.   

    大写:Upper(xxx);小写:Lower(xxx)
    其实在sqlServer的帮助中搜索“大写”、“小写”你就能找到相关帮助(当然在中文版中)
      

  3.   

    你可以用SQL函数Upper或在VB中用UCase函数转换后再保存!
      

  4.   

    判断你所输入的ASCII码值,就可以区分大小写了
      

  5.   

    用UCASE转换。
    *注:SQLSERVER中的很多函数是与VB同名的。