Convert the case, calculate the string length, and reverse a string
Use the length function to calculate the length of a string. Use the lower function to convert a string to lowercase. Use the upper function to convert a string to uppercase. Use the reverse function to reverse a string. The results are displayed in a table.
SQL
source :bill |
select
length(SubscriptionType) as "String length",
SubscriptionType as "Original string",
lower(SubscriptionType) as "Convert to lowercase",
upper(SubscriptionType) as "Convert to uppercase",
reverse(SubscriptionType) as "Reverse a string"