摘要:
全文索引的一个例子,在查询分析器中使用: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_ 阅读全文
2011年4月28日 #
摘要:
http://msdn.microsoft.com/zh-cn/library/ms177652%28v=SQL.90%29.aspx 阅读全文
摘要:
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 阅读全文
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还是 阅读全文
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(); 阅读全文
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 阅读全文