Article:
 |
|
What I Hate About Your Programming Language
|
| Subject: |
|
Re: What I Hate About SQL |
| Date: |
|
2003-05-14 19:25:41 |
| From: |
|
anonymous2
|
|
|
|
Yes, SQL is often thought of as Not A Real Programming Language. I think there are two types of developers: those who think naturally in sets, and those who don't. Not that one is better than the other, but I think naturally in sets, and love the logic behind that approach. I tend to solve most of my biggest problems that way.
Really, I think SQL's biggest failing is that it is not set-oriented enough, nor is it particularly expressive. That's why triggers, procedural languages, and all sorts of proprietary extensions had to be developed in the first place. C.J. Date and a few of his associates have been campaigning for a better relational language for years (based on TutorialD, or Alpha, or whatever it might be called next -- see www.thethirdmanifesto.com)
|
Showing messages 1 through 1 of 1.
-
Re: What I Hate About SQL
2005-12-29 04:29:23
Scott_Kirkwood
[Reply | View]
SELECT <columns> FROM <tables> WHERE <conditionals>
UPDATE <table> SET <column>=<value> WHERE <conditionals>
INSERT INTO <table> (<columns>) VALUES (<values)
Converting an insert into an update or select is more painful than it needs to be. I'd prefer:
UPDATE <columns>=<value> FROM <tables> WHERE <conditional>
and
INSERT <columns>=<values> INTO <tables> WHERE <conditionals>
I'd also make AND interchangeable with WHERE and trailing commas would be acceptable (like in Python), for example:
SELECT
A,
B,
C,
FROM myTable
AND a > 1
AND b < 1