update v_t set name=name+''''_更新'''' where right(id,1)=1

--删除测试
delete from v_t where right(id,1)=2

--显示结果
select * from v_t
go

--删除测试
drop table northwind.dbo.t_30,pubs.dbo.t_20,tempdb.dbo.t_10
drop view v_t

 /**//*--测试结果

id name
----------- ----------
1 aa_更新
11 cc_更新
21 ee_更新

(所影响的行数为 3 行)
==*/

八、 树型的实现

--参考

--树形数据查询示例
--作者: 邹建

--示例数据
create table [tb]([id] int iden << 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] 下一页 |