You are not logged in. Your edit will be placed in a queue until it is peer reviewed.
We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.
Required fields*
- Unless you are writing a stored procedure when is the last time as an application developer your actually wrote a fully formatted SQL selector? Modern languages all include some sort of ORM feature that manages this relationship for you. The column name is far more important than being able to write clean manual SQL.Bill Leeper– Bill Leeper2011-10-18 15:48:28 +00:00Commented Oct 18, 2011 at 15:48
- 4@Bill I do all the time, many, many times a day, depends more on your codebase than the language you're developing. And, for diagnostics, if you want to do some good and deep relations you can string together those natural joins and completely avoid looking up field ID's. And, as St. Jerome famously said, "Ignorance of SQL is ignorance of databases".Peter Turner– Peter Turner2011-10-18 15:57:18 +00:00Commented Oct 18, 2011 at 15:57
- Aside from the fact that natural joins are not universally supported, IMO, natural joins are harder to read. Are there two columns in relationship or only one? Far better to be explicit and avoid natural joins.Thomas– Thomas2011-10-18 17:33:38 +00:00Commented Oct 18, 2011 at 17:33
- 1@Thomas, I wouldn't put natural joins in code either, but for diagnostics, I've found them pretty useful when the database is modeled so that they actually work.Peter Turner– Peter Turner2011-10-18 17:40:25 +00:00Commented Oct 18, 2011 at 17:40
Add a comment |
How to Edit
- Correct minor typos or mistakes
- Clarify meaning without changing it
- Add related resources or links
- Always respect the author’s intent
- Don’t use edits to reply to the author
How to Format
- create code fences with backticks ` or tildes ~ ```
like so
``` - add language identifier to highlight code ```python
def function(foo):
print(foo)
``` - put returns between paragraphs
- for linebreak add 2 spaces at end
- _italic_ or **bold**
- indent code by 4 spaces
- backtick escapes
`like _so_` - quote by placing > at start of line
- to make links (use https whenever possible) <https://example.com>[example](https://example.com)<a href="https://example.com">example</a>
How to Tag
A tag is a keyword or label that categorizes your question with other, similar questions. Choose one or more (up to 5) tags that will help answerers to find and interpret your question.
- complete the sentence: my question is about...
- use tags that describe things or concepts that are essential, not incidental to your question
- favor using existing popular tags
- read the descriptions that appear below the tag
If your question is primarily about a topic for which you can't find a tag:
- combine multiple words into single-words with hyphens (e.g. design-patterns), up to a maximum of 35 characters
- creating new tags is a privilege; if you can't yet create a tag you need, then post this question without it, then ask the community to create it for you
lang-sql