在我的Java应用程序中,它需要找出底层Sybase数据库在服务器启动时是区分大小写还是不区分大小写,并相应地配置属性,有什么适当的方法可以做到这一点吗?
发布于 2013-09-06 01:03:35
如果select if 'A' = 'a' then 0 else 1 endif返回1,则DB区分大小写。
发布于 2013-09-06 10:01:39
区分大小写由服务器的字符集和排序顺序表示。
您可以从master..syscurconfigs中提取排序顺序和字符集
select value from master..syscurconfigs where config = 132 #Gives you Sort Order ID
select value from master..syscurconfigs where config = #Gives you Character Set ID一旦有了这两个值,就可以提取排序顺序的名称:
select name from master..syscharsets where id = SortOrderID and csid = CharSetID如果名称包含nocase (英文集)或nocs (非英文集),则不区分大小写。
*我知道我在第二个查询中遗漏了一个值,但当我明天回到我的笔记中时,我会填写它
https://stackoverflow.com/questions/18632942
复制相似问题