textarea中的内容通过添加按钮添加到SQL数据库中
我定义了一个 textarea:
<tr bgcolor="#CCCCCC" align="center" valign="bottom">
<td align="right" valign="top" class="style1" >文章内容:</td>
<td width="83%" bgcolor="#FFFFFF" align="left">
<textarea cols="75" rows="6" style="width: 1000px; height: 576px"></textarea>
</td>
</tr>
<tr bgcolor="#abb8d6">
<td colspan="2" width="588" align="center" height="55">
<asp:Button ID="Button1" runat="server" Text="添加" onclick="Button1_Click" Width="55px" />
<asp:Button ID="Button2" runat="server" Text="取消" onclick="Button2_Click" Width="55px" />
</td>
</tr>
现在想通过“添加”按钮将textarea中的内容添加到指定的数据库中,该怎么办?
相关文档:
定义: 何为触发器?在SQL Server里面也就是对某一个表的一定的操作,触发某种条件,从而执行的一段程序。触发器是一个特殊的存储过程。
常见的触发器有三种:分别应用于Insert , Update , Delete 事件。
我为什么要使用触发器?比如,这么两个表:
& ......
1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。
2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎
放弃使用索引而进行全表扫描,如:
select id from t where num is null
可以在num上设置
默认值0,确保表中num列没有null值,然后这
样查询:
sel ......
SQL 常用语句以及函数之一
SELECT --从数据库表中检索数据行和列
INSERT --向数据库表添加新数据行
DELETE --从数据库表中删除数据行
UPDATE --更新数据库表中的数据
--数据定义
CREATE TABLE --创建一个数据库表
DROP TABLE --从数据库中删除表
......
1、定义基本表
SQL语言使用动词CREATE定义基本表,其具体语法格式如下:
CREATE TABLE <表名>
(<列名><数据类型>[列级完整性约束条件]...[,<列名><数据类型>[列级完整性约束条件]][,<表级完整性约束条件>]);
例如:建立一个学生表Student,它由学号Sno,姓名Sname,性别Ssex,年 ......
Rebuild indexes online with SQL Server 2005
http://blogs.techrepublic.com.com/datacenter/?p=249
Online index rebuild
SQL Server 2005 introduces the ability to rebuild your indexes in an
online fashion so that other processes are able to access the table
while the rebuild is occurring. Because y ......