在线数据库管理工具(db007) v1.5(34)
typs = typ(rs(i).type)
if typs = "VARCHAR" or typs = "BINARY" or typs = "CHAR" then
tbl_struct = tbl_struct & typs & "(" & rs(i).definedsize & ")"
else
tbl_struct = tbl_struct & typs & " "
end if
attrib = rs(i).attributes
if (attrib and adFldIsNullable) = 0 then
tbl_struct = tbl_struct&" NOT NULL"
end if
if rs(i).Properties("ISAUTOINCREMENT") = True then
tbl_struct = tbl_struct & " IDENTITY"
end if
tbl_struct = tbl_struct & "," & chr(10)
next
if primarykey <> "" then
tbl_struct = tbl_struct & "PRIMARY KEY ([" & primarykey & "]));"
else
len_of_sql = Len(tbl_struct)
tbl_struct = Mid(tbl_struct,1,len_of_sql-2)
tbl_struct = tbl_struct & ");"
end if
else
tbl_struct = "CREATE TABLE [" & table & "];"
end if
getsql = getsql & tbl_struct & chr(10) & chr(10)
end function
sub help()
echo "SQL 常用语句:<br><br>"
内容版权声明:除非注明,否则皆为本站原创文章。