TDBLookupComboBox主要用于关联其它表中的字段显示相关字段的内容,一般用于列表中。如有以下两个表:主表,状态表Create table main(iID int primary key, --主键username nvarchar(20), --名字userage int, --年龄S...
分类:
数据库 时间:
2014-12-29 13:27:43
阅读次数:
208
create function [dbo].[fn_GetQuanPin](@words nvarchar(2000)) returns varchar(8000) as begin declare @word nchar(1) declare @pinyin varc...
分类:
数据库 时间:
2014-12-27 23:06:19
阅读次数:
466
declare @sql nvarchar(2000) declare @cou int declare @id varchar(20) set @id='1' set @sql='select @count=count(*) from emp where id=@id' exec sp_execu...
分类:
数据库 时间:
2014-12-26 09:37:32
阅读次数:
263
创建2张表 Table_A 和 Table_B 关系是一对多, 表Table_A.Id = Table_B.aIdCREATE TABLE [dbo].[Table_A]([Id] [char](36) NULL,[column1] [nvarchar](50) NULL,[column2] [nv...
分类:
其他好文 时间:
2014-12-25 14:31:37
阅读次数:
216
CREATE proc newgetpage (--默认分页主键为id @tblName nvarchar(128), --表名称列表 @PageSize int=10, --页尺寸 @PageIndex int=1, --当前页 @fields nvarchar(4000)='*', --查询字段...
分类:
其他好文 时间:
2014-12-25 12:57:09
阅读次数:
237
脚本语句按照截图填写
DECLARE @dbname NVARCHAR(20)
SET @dbname=N'aa'--你需要备份的库名
--定义备份时间,精确到秒
DECLARE @date NVARCHAR(64)
SELECT @date = SUBSTRING(CONVERT(VARCHAR(20), GETDATE(), 121), 1, 4) + '_'...
分类:
数据库 时间:
2014-12-25 11:23:49
阅读次数:
176
Create Proc sp_Cursor(nvarchar(50) @GPGENNo)as Declare @ErrorCode nvarchar(MAX)begin---- 例子 select * into #TempGPGENDetail from GPGENDetail where GPGe...
分类:
数据库 时间:
2014-12-25 09:58:29
阅读次数:
161
When you using sqlcmd to export some data by a query, you will found some column data is truncated if it is a ntext/text/varch(max)/nvarchar(max).the ...
分类:
其他好文 时间:
2014-12-24 19:48:09
阅读次数:
200
如果你每次建数据表的时候固执的使用varchar,那么你可能会遇到以下的问题:现在saleUserName的字段类型为varchar(50)update TableNameset saleUserName='小覃祝你?快乐' where ID=87select * from TableName wh...
分类:
其他好文 时间:
2014-12-24 09:54:20
阅读次数:
121
表结构Id int UncheckedTitle nvarchar(50) CheckedValue nvarchar(1000) CheckedRemark nvarchar(1000) Checked查询DECLARE @temp TABLE ( Id INT, Tit...
分类:
数据库 时间:
2014-12-23 10:24:47
阅读次数:
178