Skip to content

In SQL do updates accumulate or overwrite? #36

@scripting

Description

@scripting
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. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions