SQL changing a value to upper or lower case

后端 未结 5 925
一生所求
一生所求 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:51

    You can use LOWER function and UPPER function. Like

    SELECT LOWER('THIS IS TEST STRING')
    

    Result:

    this is test string
    

    And

    SELECT UPPER('this is test string')
    

    result:

    THIS IS TEST STRING
    

提交回复
热议问题