Grant permission to only create/alter/drop proc
grant create procedure to [heytest]GRANT--end --change schema owner ALTER ON SCHEMA::dbo TO heytestUSEGO [heytest1]ALTERGO AUTHORIZATION ON SCHEMA::[db_owner] TO [dbo][@more@]
求连续出现三次的某一数值的算法
DECLARE @T TABLE (ID INT,NAME VARCHAR(4),STATUS INT)INSERT INTO @TSELECT 1,'aa',0 UNION ALLSELECT 2,'aa',1 UNION ALLSELECT 3,'aa',0 UNION ALLSELECT 4,'bb',1 UNION ALLSELECT 7,'bb',1 UNION ALLSELECT 9,'bb',1 UNION ALLSELECT 10,'aa',0 UNION ALLSELECT 11,'cc',0----常规语句法,此方法不要求主键连续,但假如求连续一百次的就脸长了select a.name from @t a,@t b,@t cwhere a.name=b.name and b.name=c.name and b.id=(select top 1 id from @t where id>a.id order by id) and c.id=(select top 1 id from @t where