Home > Database > Mysql Tutorial > body text

sql判断且增加字段ADD

WBOY
Release: 2016-06-07 16:19:06
Original
1498 people have browsed it

sql 判断且增加字段 % Dim i,Rs,Sql,Table,Column,Bool Table = A Column = B Bool = False sql=Select * From [Table] Set Rs = Conn.ExeCute(Sql) For Each i In Rs.Fields 'Response.Write(i.Namebr) If i.Name=Column Then Bool = True Exit For End If

 sql 判断且增加字段

Dim i,Rs,Sql,Table,Column,Bool
Table = "A"
Column = "B"
Bool = False
sql="Select * From ["&Table&"]"
Set Rs = Conn.ExeCute(Sql)
For Each i In Rs.Fields
'Response.Write(i.Name&"
")
If i.Name=Column Then
Bool = True
Exit For
End If
Next
If Bool Then
Response.Write("在《"&Table&"》表中,存在《"&Column&"》列!")
Else
Response.Write("在《"&Table&"》表中,不存在《"&Column&"》列!")
End If
%>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!