select from where VB编程

2025-01-20 10:48:24
推荐回答(4个)
回答1:

strsql1 = "select*from sq where 始发港='" & a & "' and 目的港='" & b & "' "

Where 换成AND

回答2:

strsql1 = "select*from sq where 始发港='" & a & "'where目的港='" & b & "' "
为什么一个select 语句里面有两个where,而且第二个where后面没有空格。
第二个where应该改为 and或者or 还有后面要加空格。

回答3:

strsql1 = "select*from sq where 始发港='" & a & "'where目的港='" & b & "' "
改成 strsql1 = "select * from sq where 始发港='" & a & "'where 目的港='" & b & "' "

回答4:

a,b同时满足条件:strsql1 = "select * from sq where 始发港='" & a & "' and 目的港='" & b & "' "
a,b一个满足条件:strsql1 = "select * from sq where 始发港='" & a & "' Or 目的港='" & b & "' "