select * from tablename where id=<其中是我的参数要和整形id匹配>
来源:百度知道 编辑:UC知道 时间:2024/06/17 15:34:39
select * from tablename where id=<其中是我的参数要和整形id匹配>
如下:
如果是单个id
sql="select * from tablename where id="&id
如果是多个id
sql="select * from tablename where id in ("& id &")"
select * from tablename where id='"+id+"'
select * from tablename where id=+@id+
yes
整型,如果你确定是数值型的话,那么 代码这样写就好了
select * from tablename where id = cast(id as integer)即可。。
回答完毕
这么多人回答,看来我来晚啦。