![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DB
iteye_15344
这个作者很懒,什么都没留下…
展开
-
查询表中重复的列
查询表中重复的第一条数据 重复的: select column1,column2 from table group by column1,column2 having(count(*))>1 第一条 select top 1 * from table where column in(select column1,column2 from table group by ...2009-03-03 14:43:46 · 114 阅读 · 0 评论 -
Oracle ----Adapter could not establish the connect
Oracle 网络适配器不能建立连接问题 The Network Adapter could not establish the connection 我的是Oracle10,具体来说它里面的url是:jdbc:oracle:thin:@地址:1521:ORCL 地址的值是和Oracle 的安装目录下的product\10.2.0\db_1\NETWORK\ADMIN目录下的listener.o...2008-07-03 02:54:14 · 144 阅读 · 0 评论 -
DB几个重要的对象
MySQL 因为过程和函数可能有多个分号,所以下改一下定界符号 mysql> delimiter ! 接着创建过程 mysql> create procedure p2(name varchar(32))--定义了一个变量 -> begin -> insert into test(name) values(name); ...2008-08-11 16:49:59 · 155 阅读 · 0 评论 -
case when then的用法
select (case when 语文>=80 then '优秀' when 语文>=60 then '及格' else '不及格' end) as 语文 from grade;2009-05-12 09:49:18 · 138 阅读 · 0 评论 -
Oracle游标
查询 SELECT语句用于从数据库中查询数据,当在PL/SQL中使用SELECT语句时,要与INTO子句一起使用,查询的返回值被赋予INTO子句中的变量,变量的声明是在DELCARE中。SELECT INTO语法如下: SELECT [DISTICT|ALL]{*|column[,column,...]} INTO (va...原创 2009-07-02 13:54:01 · 65 阅读 · 0 评论 -
Oracle ref 游标
1.获得结果集 declare type refcursor is ref cursor; --ref游标类型 infolist refcursor; --集合 customer bi_customer%rowtype; --行 customercode bi_customer.customercode%type;--字段 customer...2009-07-03 15:49:13 · 90 阅读 · 0 评论 -
DMMS_SQL包
DBMS_SQL封装过程中主要函数 1、OPEN_CURSOR:返回新游标的ID值 2、PARSE:解析要执行的语句 3、BIND_VARIABLE:将给定的数量与特定的变量相连接 4、DEFINE_COLOUMN:定义字段变量,其值对应于指定游标中某个位置元素的值 (仅用于SELECT语句) 5、EXECUTE:执行指定的游标 6、EXECUTE_AND_FETC...原创 2010-08-06 11:54:09 · 141 阅读 · 0 评论