Sidharth Ghoshal
Sidharth Ghoshal

Reputation: 720

What does ">=?" mean in SQL?

I came across a line of code in SQL:

"SELECT DT FROM TABLE WHERE DT >= ?;"

and I'm trying to make sense of the ">=?" ending. DT are a collection of datetimes with some natural ordering so ">=" I would expect to receive an argument of some date, instead the "?" has me confused.

I did some googling using the queries "SQL ">=?" meaning" and "SQL ? constant" but both yielded nothing, glancing through Stackoverflow's suggested answers also yields nothing, and w3schools didn't seem to ever discuss this, so I would like to ask this purely syntax question here.

Upvotes: 0

Views: 780

Answers (1)

Gordon Linoff
Gordon Linoff

Reputation: 1270061

The >= means "greater than or equal to".

The ? is a placeholder for an anonymous parameter. This would be used from an application or dynamic SQL.

Upvotes: 4

Related Questions