SQL changing a value to upper or lower case

后端 未结 5 924
一生所求
一生所求 2021-02-02 05:39

How do you make a field in a sql select statement all upper or lower case?

Example:

select firstname from Person

How do I make firstname always return up

5条回答
  •  既然无缘
    2021-02-02 05:49

    LCASE or UCASE respectively.

    Example:

    SELECT UCASE(MyColumn) AS Upper, LCASE(MyColumn) AS Lower
    FROM MyTable
    

提交回复
热议问题