刚毕业这么写代码
for(int i=1;i<=100;i++)
{
dataset =”select * from tbname where id =”+i;
}
第二年这么写代码
dataset = “select * from tbname where id in(1,2,3,….,100)”;
第三年这么写代码
dataset = “select username,password from tbname where id in(1,2,3,….,100)”;
第四年这么写代码
create proc=”select username,password from tbname where id in(‘”+参数+”’)”;
dataset = “exec proc(1,2,3,….,100)”;
第五年这么写代码
创建一个内存表,数据为select username,password from tbname where id in(1,2,3,….,100)
代码直接从内存读取出来
第六年不知道该如何优化了……………….