随笔分类 -  MSSQL /ACCESS

摘要:打开不重复记录的单个字段(重复的NAME被过滤,只出现一次)select distinct NAME from table打开不重复记录的所有字段值(有重复的NAME,且不是最小ID的记录被过滤,只出现最小ID的NAME)select * from table where ID in (Select min(ID ) FROM table group by NAME)查出NAME字段不重复出现的记录(有重复的NAME被过滤,多于1次的NAME不出现了)select * fromtablewhereNAME in (selectNAME from tablegroup by NAME havin 阅读全文
posted @ 2011-07-22 11:45 jex 阅读(975) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-07-21 21:19 jex 阅读(0) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-07-21 21:13 jex 阅读(1) 评论(0) 推荐(0)
摘要:The table below shows the ADO Data Type mapping between Access, SQL Server, and Oracle:DataType EnumValueAccessSQLServerOracleadBigInt20BigInt (SQL Server 2000 +)adBinary128BinaryTimeStampRaw *adBoolean11YesNoBitadChar129CharCharadCurrency6CurrencyMoneySmallMoneyadDate7DateDateTimeadDBTimeStamp135Da 阅读全文
posted @ 2011-07-21 15:08 jex 阅读(431) 评论(0) 推荐(0)
摘要:1.按姓氏笔画排序:Select * From TableName Order By CustomerName Collate Chinese_PRC_Stroke_ci_as 2.数据库加密:select encrypt('原始密码')select pwdencrypt('原始密码')select pwdcompare('原始密码','加密后密码') = 1--相同;否则不相同 encrypt('原始密码')select pwdencrypt('原始密码')select pwdcompare(&# 阅读全文
posted @ 2011-07-16 09:32 jex 阅读(233) 评论(0) 推荐(0)