随笔分类 - SQL
摘要:1 select uc.table_name,ucc.column_name,uc.constraint_name,uc.constraint_type,uc.status2 from user_constraints uc 3 inner join user_cons_columns ucc4 on uc.constraint_name=ucc.constraint_name5 order by 1;
阅读全文
摘要:原来pulisher表name字段有重复1 CREATE TABLE Publisher(2 publisherId INTEGER NOT NULL CONSTRAINT pk_Publisher PRIMARY KEY,3 name NVARCHAR2(200) NOT NULL4 );先创建一个结构的表:1 CREATE TABLE newPublisher(2 publisherId INTEGER NOT NULL CONSTRAINT pk_newPublisher PRIMARY KEY,3 name NVARCHAR2(200) NOT NULL4 );然后1 insert i
阅读全文
摘要:使用ODP.NET 批量插入时,将cmd.ArrayBindCount 设置为10万时出错,经搜索得知,原来使用array DML operations一次最多插入65535条=2^16。但是据我实验一次最多插入65534条。本人使用的是Oracle 10.1.0.2。不知道之后的版本修复了没有!以下是插入6万条记录,各种方法花费的时间。ordinaryInsert 1 static void ordinaryInsert(int[] ids, string[] names) 2 { 3 using (OracleConnection connection = new OracleConnec
阅读全文
摘要:PLS-00357: Table,View Or Sequence reference 'string' not allowed in this context Cause: A reference to database table, view, or sequence was found in an inappropriate context. Such references can appear only in SQL statements or (excluding sequences) in %TYPE and %ROWTYPE declarations. Some
阅读全文
摘要:ORA-00911: invalid character。这是因为在其末尾加上了“;”的缘故,去掉“;”SQL就可以执行了~
阅读全文

浙公网安备 33010602011771号