随笔分类 -  SQL

摘要:引用地址: http://hi.baidu.com/aaxh/blog/item/6d4863590b74a4292834f0db.html 1. 定义游标定义 游标语句的核心是定义了一个游标标识名,并把游标标识名和一个查询语句关联起来。DECLARE语句用于声明游标,它通过SELECT查询定义游标存储的数据集合。语句格式为: DECLARE 游标名称 [INSENSITIVE] [SCROLL]... 阅读全文
posted @ 2007-10-24 17:51 狐狸马三 阅读(2868) 评论(0) 推荐(0)
摘要:select * from 表A where exists(select * from 表B where 表B.id=表A.id) 这句相当于 select * from 表A where id in (select id from 表B) 对于表A的每一条数据,都执行select * from 表B where 表B.id=表A.id的存在性判断,如果表B中存在表A当前行相同的id,则exist... 阅读全文
posted @ 2007-07-18 13:42 狐狸马三 阅读(330) 评论(0) 推荐(0)
摘要:TRUNCATE TABLE命令使用,以及和DELETER 区别! 阅读全文
posted @ 2007-04-18 11:42 狐狸马三 阅读(408) 评论(0) 推荐(0)
摘要:SQL连接的使用,概念,实践。 阅读全文
posted @ 2006-09-25 17:57 狐狸马三 阅读(334) 评论(0) 推荐(0)