In SQL do updates accumulate or overwrite?

Open
#36 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
sql
Domain
databases

Research direction

The issue body contains only a conceptual question and mentions no repository files, tests, or entry points. Start by reviewing the discussion to determine whether a documentation change is intended, then define the target SQL behavior and where it should be documented before estimating the work.

Written by the indexing model from the issue text.

Description

Suppose I have table with three fields -- id, weight, when
	we're keeping track of people and their weight.
	id identifies a person
	weight is their weight
	when is when the reading took place
I enter the weight every week
	when I do that, does that create a new row in the table, or does it replace the existing row?
I have a feeling it has to do with keys
	I don't even remember if SQL databases have keys!
	So this is a crucial question.
	If they do have keys, I'd make _id_ the key.
	Note I _want_ it to overwrite. I don't care what the person's weight was last week or year. 
Dominant language
HTML
Stars
134
Forks
10
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/Scripting-News

All issues in scripting/Scripting-News

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.