在线数据库管理工具(db007) v1.5(14)
</tr>
</table>
</form>
<%
end sub
'==================================================================构建创建表的SQL语句
sub create_table()
dim sql,i,primarykey
on error resume next
sql = "CREATE TABLE ["&request("table_name")&"] ("
for i = 1 to request("i")
sql = sql & "[" & request("field_name")(i) & "] " & request("field_type")(i)
if request("field_size")(i) <> "" then
sql = sql & "(" & request("field_size")(i) & ")"
end if
if request("null")(i) = "NOT_NULL" then
sql = sql & " not null"
end if
if request("autoincrement")(i) = "自动编号" then
sql = sql & " identity"
end if
if request("primarykey")(i) = "primarykey" then
primarykey = request("field_name")(i)
end if
'if primarykey <> "" then
sql = sql & ","
'end if
next
if primarykey<>"" then
sql=sql&" primary key (["&primarykey&"]) "
end if
sql = sql & ")"
sql = replace(sql,"()","") '构建空表
response.redirect "?key=sql&sql=" & sql
end sub
'==================================================================修改表名或字段名 2006-09-08
内容版权声明:除非注明,否则皆为本站原创文章。