易顺金
大脑经常短路,陷入死循环。

在有些人工作中这就叫操作。从要实现目的出发,在过程中可以每分钟每小时来制造操作错误,掌握过程,从而不落痕迹的达不到目标。

今天硬盘的结束不了任务,强行退出,发挥了小小作用。

遇到了insert 多条语句,一条能执行成功,但两条多条不行,排除;分号的影响。

http://www.itpub.net/thread-905866-2-1.html

在c#写查询语句的时候结尾处不能加;

string sql="insert into  a (name,age)values ('张三',15);"; 错误

string sql="insert into  a (name,age)values ('张三',15)";正确

批量查询语句

string sql="insert into a(name,age) select ('张三',15) from dual union

                                  select ('张二',15) from dual union

                                   select ('张以,15) from dual ";

在给表b建立自动增长列

create table b(

id number(2) primary key,

name nvarchar(10)

)

创建自动增长序列

create sequence b_seq minvalue 1 maxvalue 9999 start with 1 increment by 1;

插入值

string sql="insert into b values(b_seq.nextval,'yiyi')";  可以插入

但是用批量插入 不支持 b_seq.nextval的值

string sql=@"insert into b select b_seq.nextval,'yy' from dual union

                                      select b_seq.nextval,'kk'  from dual union

                                      select  b_seq.nextval,'dd' from dual ";

posted on 2013-08-07 09:25  易顺金  阅读(142)  评论(0编辑  收藏  举报