Sql 如何在查询中从同一列传递多个值?
如何在查询中从同一列传递多个值?我正在使用vb.net和sql server数据库 在我的查询中,会生成一个异常,表示@booking\u date已声明,请尝试其他变量 我的问题是:Sql 如何在查询中从同一列传递多个值?,sql,vb.net,datetime,ado.net,Sql,Vb.net,Datetime,Ado.net,如何在查询中从同一列传递多个值?我正在使用vb.net和sql server数据库 在我的查询中,会生成一个异常,表示@booking\u date已声明,请尝试其他变量 我的问题是: Dim da As New SqlDataAdapter("select * from Bookings where booking_date Between (@booking_date AND @booking_date) AND booking_time Between (@booking_time AND
Dim da As New SqlDataAdapter("select * from Bookings where booking_date Between (@booking_date AND @booking_date) AND booking_time Between (@booking_time AND @bookinbg_time) AND game = " & x, con)
您是否需要在变量周围加括号?使用BETWEEN而不是
booking\u date=@booking\u date和booking\u time=@booking\u time
的目的是什么?