有爱的天空,处处都是暖阳阳的。

博客园 首页 新随笔 联系 订阅 管理

2011年4月28日 #

摘要: 全文索引的一个例子,在查询分析器中使用:usepubsgo--打开数据库全文索引的支持executesp_fulltext_database'enable'go--建立全文目录ft_titlesexecutesp_fulltext_catalog'ft_titles','create'go--为titles表建立全文索引数据元,UPKCL_titleidind是主键所建立的唯一索引,可由sp_helptitles得知executesp_fulltext_table'titles','create','ft_ 阅读全文
posted @ 2011-04-28 11:12 荣耀轩辕 阅读(206) 评论(0) 推荐(0) 编辑

摘要: http://msdn.microsoft.com/zh-cn/library/ms177652%28v=SQL.90%29.aspx 阅读全文
posted @ 2011-04-28 10:54 荣耀轩辕 阅读(162) 评论(0) 推荐(0) 编辑

摘要: 1.select top m * from tablename where id not in (select top n id from tablename)2.select top m * into 临时表(或表变量) from tablename order by columnname -- 将top m笔插入set rowcount nselect * from 表变量 order by columnname desc3.select top n * from (select top m * from tablename order by columnname) aorder by c 阅读全文
posted @ 2011-04-28 10:14 荣耀轩辕 阅读(148) 评论(0) 推荐(0) 编辑

2011年4月13日 #

摘要: 看到了很有一些很有意思的例子,拿出来分享一下 所有的一切源于一个实验,在ORA数据库下 Sql代码 createtablet(aint,bint);insertintotvalues(2,3);select1fromt;create table t (a int ,b int); insert into t values(2,3); select 1 from t; 结果: title: 1 value: 1 Sql代码 select0fromt; 结果: title: 0 value: 0 在表a中多插入几行,比如,又插入3行,值随便取,再使用select 1/0 查询,返回的title还是 阅读全文
posted @ 2011-04-13 17:16 荣耀轩辕 阅读(4963) 评论(0) 推荐(0) 编辑

2011年4月12日 #

摘要: //企业选择的网站类别 DataSet ds_mark_code_common = new Mark_Code_CommonBLL().MARKP_CodeCommon_selectByConditions(CompanyId, 1, 1); ddlCommonList.DataSource = ds_mark_code_common; ddlCommonList.DataTextField = "MCC_Ccname"; ddlCommonList.DataValueField = "MCC_Id"; ddlCommonList.DataBind(); 阅读全文
posted @ 2011-04-12 09:30 荣耀轩辕 阅读(1911) 评论(0) 推荐(0) 编辑

2011年3月16日 #

摘要: 方法1:declare @objid int,@objname char(40)set @objname = 'tablename'select @objid = id from sysobjects where id = object_id(@objname)select 'Column_name' = name from syscolumns where id = @objid order by colid方法2:select Name from syscolumns where id=object_id( 'DataBaseName.TableNa 阅读全文
posted @ 2011-03-16 16:15 荣耀轩辕 阅读(596) 评论(0) 推荐(0) 编辑