西安治疗尖锐的医院:SQL语句
来源:百度文库 编辑:九乡新闻网 时间:2024/04/29 07:23:02
string sql =
"INSERT OrderBook (OrderID, BookID, Quantity,UnitPrice)" +
" VALUES (@OrderID, @BookID, @Quantity,@UnitPrice)"; SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@OrderID", order.Order.Id), //FK
new SqlParameter("@BookID", order.Book.Id), //FK
new SqlParameter("@Quantity", order.Quantity),
new SqlParameter("@UnitPrice", order.UnitPrice)
}; DBHelper.ExecuteCommand(sql, para); 第一种连接字符串:connectionString="Data Source=ADMINISTRATOR\SQL2005;Initial Catalog=UserDB;Persist Security Info=True;User ID=sa;Password=123"第二种连接字符串:(常用)connectionString="server=administrator\sql2005;database=UserDB;uid=sa;pwd=123"
在数据库的一个函数中,看到了v_count:=sql%rowcount
求最近执行影响行数declare @testid varchar(40)
declare curTest cursor
for
select R_user from T_Reply
open curTest
fetch next from curTest into @testid
while(@@fetch_status=0)
begin
select R_id from T_Reply
print @testid
fetch next from curTest into @testid
end
close curTest
Deallocate curTest
"INSERT OrderBook (OrderID, BookID, Quantity,UnitPrice)" +
" VALUES (@OrderID, @BookID, @Quantity,@UnitPrice)"; SqlParameter[] para = new SqlParameter[]
{
new SqlParameter("@OrderID", order.Order.Id), //FK
new SqlParameter("@BookID", order.Book.Id), //FK
new SqlParameter("@Quantity", order.Quantity),
new SqlParameter("@UnitPrice", order.UnitPrice)
}; DBHelper.ExecuteCommand(sql, para); 第一种连接字符串:connectionString="Data Source=ADMINISTRATOR\SQL2005;Initial Catalog=UserDB;Persist Security Info=True;User ID=sa;Password=123"第二种连接字符串:(常用)connectionString="server=administrator\sql2005;database=UserDB;uid=sa;pwd=123"
在数据库的一个函数中,看到了v_count:=sql%rowcount
求最近执行影响行数declare @testid varchar(40)
declare curTest cursor
for
select R_user from T_Reply
open curTest
fetch next from curTest into @testid
while(@@fetch_status=0)
begin
select R_id from T_Reply
print @testid
fetch next from curTest into @testid
end
close curTest
Deallocate curTest
SQL语句
SQL语句
实用Sql语句大全
经典SQL语句
Oracle SQL精妙SQL语句讲解
SQL学习第九步---SQL UPDATE 语句
sql语句的编写 - 解决方案
引用 精妙SQL语句收集
数据库基本----SQL语句大全
Mongodb 与sql 语句对照
Oracle维护常用SQL语句
数据库基本----SQL语句大全
SQL学习第八步---SQL INSERT INTO 语句
通过分析SQL语句的执行计划优化SQL(总结)
数据库基本----SQL语句大全123
MySQL:常用基本SQL语句小结11
数据库基本----SQL语句大全11
SQL学习第十步---SSQL DELETE 语句
【新提醒】sql语句学习 细点
常用SQL语句书写技巧 - SQL Server - 数据库 - 程序员之家
sql server2005 存储数据库表名、字段名、描述的数据库表和sql语句
[转]通过分析SQL语句的执行计划优化SQL(总结)
【转】 使用SQLite3学习SQL语句的使用
面试必须要知道的SQL语法,语句