close
The Wayback Machine - https://web.archive.org/web/20201013110802/https://github.com/treffynnon/sqlstyle.guide/issues/68
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

CHECK pens_in_drawer violates "preferred formalisms" re. BETWEEN #68

Closed
Gumnos opened this issue Aug 8, 2020 · 1 comment
Closed

CHECK pens_in_drawer violates "preferred formalisms" re. BETWEEN #68

Gumnos opened this issue Aug 8, 2020 · 1 comment

Comments

@Gumnos
Copy link

@Gumnos Gumnos commented Aug 8, 2020

The "Preferred Formalisms" section advises

Make use of BETWEEN where possible instead of combining multiple statements with AND.

but the example in the "Defining Constraints" section has

CHECK(pens_in_drawer >= 1 AND pens_in_drawer < 100)

which should likely be

CHECK(pens_in_drawer BETWEEN 1 AND 99)

(though I'd also posit that it might make sense not to have any pens in the drawer and thus it should be BETWEEN 0 and 99)

Gumnos added a commit to Gumnos/sqlstyle.guide that referenced this issue Aug 8, 2020
Should fix treffynnon#68 at least in the English version (might need to be similarly applied against other-language versions)
@treffynnon
Copy link
Owner

@treffynnon treffynnon commented Aug 28, 2020

I've updated the examples across the languages. Also, if you don't have a pen in your drawer then you cease to be a member of staff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.