About SQL condition query statement

zhaozj2021-02-16  78

For digital variables

SELECT * from lesson where id = "& variable

But I want to check it is a string.

But still used

SELECT * from lesson where id = "& variable

Anyway, there is a lack of parameter errors, and later the name is also changed, I think a lot of ways, I realized it!

It turns out to use Select * from classes where divart Like 'string'

One trial, it's okay, but I have encountered trouble, my string is the variable, what should I do?

First use like '"& divartmentSelected"' "oversible!"

Oh, then carefully, I found like '"& divartmentselected &"' "

Oh, the foundation is too bad!

Work hard to learn ~~~

转载请注明原文地址:https://www.9cbs.com/read-12515.html

New Post(0)