这个“create table语句”怎么会有语法错误?在线等!

xry29 2004-04-09 10:27:34
testid=request.querystring("testid")
sql="create table "&testid&"{main varchar(20),type varchar(20)}"
conn.execute(sql)
----error:create table 语法错误?

sql="insert into test(main,type) values("&trim(request("main"))&","&trim(request("type"))&")"
conn.execute(sql)
----error:insert into语法错误?

...全文
416 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
stefli 2004-04-09
  • 打赏
  • 举报
回复
建议看看数据库方面的书籍~
DCL
DML
.
xieyj 2004-04-09
  • 打赏
  • 举报
回复
create table 表名后应该是小括号() 而不是大括号 {}
jaexc 2004-04-09
  • 打赏
  • 举报
回复
sql="create table "&testid&"( main varchar(20),type varchar(20) ) "
{ } 为--> ( )

sql="insert into test(main,type) values('"&trim(request("main"))&"','"&trim(request("type"))&"')"

加'' insert test(main,type) values('xx','yy')

28,409

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧