Oracle笔记三
摘要:用not exists 代替not inselect * from tsp_product p where not exists(select 'X' from tsp_orderitem i where p.id=i.product_id)select * from tsp_product p where id not in(select product_id from tsp_orderitem i where p.id=i.product_id)用exists 代替inselect * from tsp_product p where p.id in(select pro
阅读全文
posted @
2011-04-20 23:06
Ss_Andy
阅读(477)
推荐(0)
跨库触发器
摘要:本文欢迎转载,但必须在文章显眼处保留原文地址http://blog.163.com/ganlanfei@126/blog/static/1218198712010117102015585/在MS SQL里面,标识一个对象,是使用四段式全称来标识的服务器名、数据库名、所有者名、对象名在同一服务器下面,也可以使用三段式全称来标识对象,所有者名的默认值是数据库的所有者(dbo),可省略,如:pubs.dbo.student和pubs..student表达的意思是一样的!请注意pubs..student(中间两点)下面看下一个简单的例子吧。create trigger triggerUser //创建
阅读全文
posted @
2010-12-07 22:24
Ss_Andy
阅读(634)
推荐(0)