摘要: 1.查询表是否存在,如果不存在,就添加select count(*) into v_count from user_all_tables where table_name = 'A'; if v_count = 0 then execute immediate 'create table A(ID NUMBER not null'; end If;2.查询表的主键是否存在,不存在就添加主键select count(*) into v_count from user_cons_columns a where a.constraint_name = 'PK_ 阅读全文
posted @ 2012-09-19 14:06 唐江兰 阅读(1798) 评论(0) 推荐(0) 编辑
摘要: select m.id, m.userid from app_result_record m where INSTR(',' || v_resultId || ',', ',' || m.result_id || ',') > 0这样就可以查到你想要的数据了 阅读全文
posted @ 2012-09-19 13:56 唐江兰 阅读(366) 评论(0) 推荐(0) 编辑
摘要: OracleParameter v_result = new OracleParameter("v_result", OracleType.Clob); v_result.Value = result; cmdInsertAppResult.Parameters.Add(v_result);这样处理一下,就可以把值插入数据库表中了 阅读全文
posted @ 2012-09-19 13:53 唐江兰 阅读(1107) 评论(0) 推荐(0) 编辑