摘要:
数据库中空值的处理 -> 准备一张新表 create table nullTable ( id int primary key, name nvarchar(10) ) insert into nullTable(id, name) values(1, '名字1'),(2, '名字2'); inse 阅读全文
摘要:
SqlParameter p = new SqlParameter("@pageIndex", (object)pageIndex); SqlParameter带有两个参数的构造函数有两个重载一个: 是使用object类型的参数,表示与这个别名绑定的值 为参数赋值 SqlParameter p = 阅读全文
摘要:
1 create table tbl1 2 ( 3 id int identity(1,1) primary key, 4 name nvarchar(10) 5 ); 6 create table tbl2 7 ( 8 id int identity(1,1) prima... 阅读全文
摘要:
1 create table tblInsert 2 ( 3 id int identity(1,1) primary key, 4 name nvarchar(10) 5 ); 6 7 insert into tblInsert(name) values('张三'); 8 9... 阅读全文
摘要:
与ADO.Net执行SQL语句的地方只有两点不同1.使用存储过程名代替sql语句2. 使用查询对象SqlCommand,需配置一个CommandType属性存储过程的执行语法-> exec 存储过程的名字 参数值列表;执行带有output参数的存储过程-- 第一定义参数,与定义正常参数一模一样,但... 阅读全文