Re:SQL Reserved Words – The Empirical List
by c0nfused on Wednesday October 11, 2023 @12:28PM
(#37846563)
This is the way.
INSERT INTO [FROM] ([SELECT], [WHERE], [EQUALS]) VALUES( 'WHY YES', 'IT DOES', 'WORK')
Re:SQL Reserved Words – The Empirical List
by vidarh on Wednesday October 11, 2023 @01:01PM
(#37847084)
This is how you get maintenance developers to take out hits on you.
Re:SQL Reserved Words – The Empirical List
by codetrotter on Wednesday October 11, 2023 @02:11PM
(#37848121)
Bonus points if the tables contain highly abstracted data, so that there is no obvious name you could rename the tables and their columns either.
Re:SQL Reserved Words – The Empirical List
by mirages on Wednesday October 11, 2023 @01:37PM
(#37847645)
Here is my try :
WITH [WITH] AS (
SELECT [AS], [IN], [ON]
FROM [UNION]
WHERE [AND] = [OR]
),
[OUTER] AS (
SELECT [LEFT], [RIGHT], [FULL]
FROM [CROSS]
WHERE [INNER] = [OUTER]
),
[GROUP] AS (
SELECT COUNT(*) AS [HAVING]
FROM [ORDER]
GROUP BY [GROUP]
HAVING COUNT(*) > 1
)
SELECT
[WITH].[AS],
[OUTER].[LEFT],
[GROUP].[HAVING]
FROM
[WITH]
JOIN
[OUTER]
ON
[WITH].[IN] = [OUTER].[RIGHT]
LEFT JOIN
[GROUP]
ON
[WITH].[ON] = [GROUP].[HAVING]
WHERE
[WITH].[AS] = [OUTER].[LEFT]
AND
([GROUP].[HAVING] IS NULL OR [GROUP].[HAVING] > 1)
ORDER BY
[WITH].[AS] ASC;
Re:SQL Reserved Words – The Empirical List
by NoMoreNicksLeft on Wednesday October 11, 2023 @03:20PM
(#37849059)
I shouldn't even try. I'm clearly way out of my league here. Have an updoot.
?