如何查找具有小写字符串MySQL查询的行

时间:2017-08-04 06:53:21

标签: mysql phpmyadmin

如何在同一列上查找小写字符串 我的表Collat​​ion latin1_swedish_ci

SELECT * FROM `table_name`  WHERE  UPPER(column_name) != column_name

2 个答案:

答案 0 :(得分:1)

尝试下面的内容。这将为您提供所有具有小写字符串的列条目 -

accountName := "<your-storage-account-name>"
accountKey := "<your-storage-account-key>"
client, _ := storage.NewBasicClient(accountName, accountKey)
blobClinet := client.GetBlobService()
containerName := "mycontainer"
container := blobClinet.GetContainerReference(containerName)

// Two sample ways for uploading
// 1. Upload a text blob from string reader
blobName := "upload.txt"
blob := container.GetBlobReference(blobName)
strReader := strings.NewReader("upload text to blob from string reader")
blob.CreateBlockBlobFromReader(strReader, nil)

// 2. Upload a file from file reader
fileName := "hello.png"
file, _ := os.Open(fileName)
blobName := "hello.png"
blob := container.GetBlobReference(blobName)
blob.CreateBlockBlobFromReader(file, nil)

答案 1 :(得分:0)

你需要说出COLLATE latin1_swedish_ci

SELECT * FROM `table_name`  WHERE  UPPER(column_name) != column_name
COLLATE latin1_swedish_ci

SELECT * FROM `table_name` 
WHERE UPPER([column_name]) COLLATE latin1_swedish_ci !=[column_name]

应首先检查各个数据库和列的默认排序规则...并使用查询表达式传递默认排序规则