新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
MySQLSQL數(shù)據(jù)庫清空代碼清空
以下的文章主要介紹的是MySQLSQL數(shù)據(jù)庫清空代碼 _php 清空mysql asp的實際操作情況,本文主要講述的是access或是mssql 2009-10-14 17:34asp 代碼的詳細解析,希望會給你帶來一些幫助在此方面。

成都創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設、高性價比六合網(wǎng)站開發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式六合網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設找我們,業(yè)務覆蓋六合地區(qū)。費用合理售后完善,10年實體公司更值得信賴。
復制代碼 代碼如下:
- <%
- Dim Rs,Conn
- Set Conn=Server.CreateObject("Adodb.Connection")
- Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&server.mappath("readlog.mdb")
- Set Rs=Conn.OpenSchema(20)
- Do While not Rs.Eof
- If Ucase(Rs("TABLE_TYPE"))="TABLE" Then '
如果是用戶表
- Conn.Execute("Drop Table "&Rs("TABLE_NAME")&"")
- End If
- Rs.MoveNext
- Loop
- Response.Write "成功!"
- Rs.Close
- Set Rs=Nothing
- Conn.Close
- Set Conn=Nothing
- %>
php清空mysql
MySQLSQL數(shù)據(jù)庫;復制代碼 代碼如下:
- $user = "readlog.cn";//賬號
- $password = "readlog.cn";//密碼
- $dbname = "readlog";//數(shù)據(jù)庫
- $link = mysql_connect("localhost:3306",$user,$password);
- mysql_select_db("$dbname",$link);
- echo "
正在清空數(shù)據(jù)庫...";
- $result=mysql_query("SHOW tables",$link);
- while ($currow=mysql_fetch_array($result));
- mysql_query("DROP TABLE IF EXISTS $currow[0]");
- echo "成功!";
- ?>
asp清空mssql
復制代碼 代碼如下:
- <%
- Dim Rs,Conn
- Set Conn=Server.CreateObject("Adodb.Connection")
- Conn.Open "Provider=Sqloledb; User ID=readlog.cn; Password=readlog.cn; Initial Catalog =readlog; Data Source=(local);"
- Set Rs=Conn.Execute("Select name from sysobjects Where xtype=char(85) order by id")
- Do While Not Rs.Eof
- Conn.Execute("drop table table "&rs(0)&"")
- Rs.movenext
- loop
- Response.Write "成功!"
- Rs.Close
- Set Rs=Nothing
- Conn.Close
- Set Conn=Nothing
- %>
以上的相關內容就是對MySQLSQL數(shù)據(jù)庫清空代碼的介紹,望你能有所收獲。
網(wǎng)站欄目:MySQLSQL數(shù)據(jù)庫清空代碼清空
文章分享:http://m.5511xx.com/article/djpppjc.html


咨詢
建站咨詢
