Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[sql/en] More database-agnostic SQL #4609

Closed
wants to merge 10 commits into from
Closed

Conversation

bowmanjd
Copy link

@bowmanjd bowmanjd commented Mar 3, 2023

  • I solemnly swear that this is all original content of which I am the original author
  • Pull request title is prepended with [language/lang-code] (example [python/fr-fr] or [java/en])
  • Pull request touches only one file (or a set of logically related files with similar changes made)
  • Content changes are aimed at intermediate to experienced programmers (this is a poor format for explaining fundamental programming concepts)
  • If you've changed any part of the YAML Frontmatter, make sure it is formatted according to CONTRIBUTING.md
    • Yes, I have double-checked quotes and field names!

Fixes #4602
A lot of changes on this one that I hope promote discussion:

  • I tested my changes on MySQL, MariaDB, PostgreSQL, Microsoft SQL Server, SQLite, IBM DB2, and Oracle. If a statement doesn't work or works differently on one of these engines, I noted it.
  • Instead of referencing the MySQL-specific employees database, I introduced CREATE and INSERT statements that populate a minimalist data sample for querying later, and altered all subsequent queries accordingly.
  • I favored ANSI and then explain variants where appropriate, such as with ORDER BY... OFFSET... FETCH... vs LIMIT vs TOP
  • I added a link to the Sakila database which is a fuller option and supports a wide range of engines

Questions:

  • How best to show variants, such as LIMIT or TOP? Should they be commented or left as-is? They will not run on certain engines.
  • Is the created-on-the-fly sample tables a good idea, or is it better to just use something like the Sakila sample database throughout
  • Should we be describing the CREATE DATABASE and USE syntax at all, since it varies so much across engines?

@bowmanjd
Copy link
Author

bowmanjd commented Jun 2, 2023

Would it be more helpful if I broke these changes out into multiple PRs? Happy to do so if anything here is helpful.

@verhovsky
Copy link
Collaborator

Sorry but this makes the article longer for no real benefit for most people. The link to http://troels.arvin.dk/db/rdbms should be enough for the people who need to know about it.

@verhovsky verhovsky closed this Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sql/en] Broaden engine support and ANSI compatibility
2 participants