Adam Glauser wrote:
Joe Pluta wrote:
Then again, SQL considers SELECT * FROM FILE WHERE '1' = '0' to be valid syntax, so I guess it only follows that the WHERE clause wouldn't cause it to fail.

I don't think this is really unreasonable. Consider that any programming language that I know of will let you say

do until (true = false)
// something I want to do forever

Not to put too fine a point on it, but the whole point of SQL is that it is supposed to be a higher-level abstraction. SQL is a declarative language, not an imperative one. In an imperative language, the compiler basically does what I tell it, how I tell it to. With SQL, it's supposed to do a lot of the "how" for me, and so I would hope that it would catch more of these.

Heck, even the lowest level of languages such as C have things like lint, a preprocessor which looks for common errors. I think it would be great for an SQL preprocessor to be able to check for the same sorts of things.

If you can come up with syntax checkers that can capture most logic errors (without any false positives), then to paraphrase (fake) Sean Connery: "You're sitting on a gold mine Pluta!" :)
Why now that's an interesting concept...

Joe

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.