asp中sql语句的问题

来源:百度知道 编辑:UC知道 时间:2024/06/28 05:08:56
在asp中
sql="select * from table where new=t"
这句错误在哪里?
table表中new是字符型字段。

上面仁兄都是错的,
我是专搞asp的
正确写法是这样的哦
sql="select * from table where new='"&t&"'"
字符型都得这样写才行!'"&t&"'

字符串要引号

@t
因为它是变量。
sql="select * from table where new="+t

sql="select * from table where new='t'"

sql="select * from table where new="&t