- 博客(0)
- 资源 (3)
- 收藏
- 关注
获得汉字笔画
create function fun_getbh(@char nchar(2))
returns int
as
begin
return(
case when unicode(@char) between 19968 and 40869 then(
select top 1 id from(
select id=1,ch=N'亅' union all select 2,N'阝'
union all select 3,N'马' union all select 4,N'风'
union all select 5,N'龙' union all select 6,N'齐'
union all select 7,N'龟' union all select 8,N'齿'
union all select 9,N'鸩' union all select 10,N'龀'
2016-01-05
标识列与普通列相互转换示例
标识列与普通列相互转的示例
--创建测试表
CREATE TABLE t1(ID int IDENTITY,A int)
GO
--插入记录
INSERT t1 VALUES(1)
GO
--1. 将IDENTITY(标识)列变为普通列
ALTER TABLE t1 ADD ID_temp int
GO
UPDATE t1 SET ID_temp=ID
ALTER TABLE t1 DROP COLUMN ID
EXEC sp_rename N't1.ID_temp',N'ID',N'COLUMN'
INSERT t1 VALUES(100,9)
GO
--.........
2016-01-05
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人