sql列外壳问题 [英] sql column casing issue

查看:106
本文介绍了sql列外壳问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在两个表中有一个包含相同值的列。

但是外壳是不同的..有些是大写的,有些是小的。

它的大写一张桌子和另一张桌子......随机!



如何在同一箱子中制作两张桌子?



请记住两个不同表中的列中存在相同的数据..但不同的外壳。

I have a column in two tables which contain the same values.
But the casing is different..some are capitalized and some are small.
its capitalized in one table and small in the other..so random!.

How do I make both of them in the same case?

Remember same data exists in the column in two different tables..but different casing.

推荐答案

您的数据库患有某些疾病(重复)数据)你不知道真正的原因,去看看数据库规范化的医生。

是的,有简单的SQL查询可以使2列中的值变成相同的情况,但没有用。如果根本原因没有得到解决,问题就会再次出现,即数据库规范化。

找出原因并治愈这里 [ ^ ]
Your database is suffering from some sickness (duplicate data) without you knowing the real cause, go see a doctor of "database normalization".
Yes, there is simple sql query to make the values in the 2 columns into same case, but no use. The problem is going to come back again, if the root cause is not tackled, i.e. "database normalization".
Find out the cause and cure here[^]


如果你想以大写字母显示数据然后使用



select upper(Column_Name )来自TbaleName



更低



从TbaleName选择更低(Column_Name)





表格使用加入或条件
if you want to Display data in Upper case then use

select upper(Column_Name) from TbaleName

for lower

select lower(Column_Name) from TbaleName


for both table using join or where Condition


这篇关于sql列外壳问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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