SQLite 将第一个字母更新为大写 [英] SQLite Updating first letter to be upper case

查看:38
本文介绍了SQLite 将第一个字母更新为大写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个字段,customer.country

I have a field, customer.country

我正在尝试更新它,以便国家/地区值的第一个字母为大写.我似乎无法找到这样做的方法.

Iam trying to update it so that the first letter of the values in country are upper case. I don't seem to be able to find out a way of doing that.

推荐答案

UPDATE customer
  SET country = UPPER(SUBSTR(country, 1, 1)) || SUBSTR(country, 2)

这篇关于SQLite 将第一个字母更新为大写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆