asp如何删除数据库某表中的所有记录?
4个回答
展开全部
<%
Dim conn,connSql
ConnSql="driver={SQL Server};server=.; uid=sa;pwd=sa;database=lab1"
Set conn = Server.CreateObject("Adodb.Connection")
conn.open connSql
dim dsql
dsql="delete from [table]"
conn.execute dsql
conn.execute dsql
conn.close
set conn=nothing
%>
Dim conn,connSql
ConnSql="driver={SQL Server};server=.; uid=sa;pwd=sa;database=lab1"
Set conn = Server.CreateObject("Adodb.Connection")
conn.open connSql
dim dsql
dsql="delete from [table]"
conn.execute dsql
conn.execute dsql
conn.close
set conn=nothing
%>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<%
Dim
conn,connSql
ConnSql="driver={SQL
Server};server=.;
uid=sa;pwd=sa;database=lab1"
Set
conn
=
Server.CreateObject("Adodb.Connection")
conn.open
connSql
dim
dsql
dsql="delete
from
[table]"
conn.execute
dsql
conn.execute
dsql
conn.close
set
conn=nothing
%>
Dim
conn,connSql
ConnSql="driver={SQL
Server};server=.;
uid=sa;pwd=sa;database=lab1"
Set
conn
=
Server.CreateObject("Adodb.Connection")
conn.open
connSql
dim
dsql
dsql="delete
from
[table]"
conn.execute
dsql
conn.execute
dsql
conn.close
set
conn=nothing
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
delete from [table]
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
TRUNCATE TABLE aspxweb
速度比用DELETE快
速度比用DELETE快
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询