Jump to content

SQL; UPDATE and INSERT


Hero192

Recommended Posts

INSERT is when you want to add a new record to your database, the UPDATE is only used to manipulate data. Lets say;

A user registers a new account on your server => insert

Someone changes their password => update

You create a new vehicle and save it in your database => insert

The vehicle changed from color => update

Link to comment

Thank you for the clear informations & for your examples.

By the way,

I start doing a login system I want to store password in should I use the value as TEXT or INTEGER?

because as you know, Passwords can't be controlled it can be numbers and words in same time

dbExec (connection, "CREATE TABLE IF NOT EXISTS  data (account TEXT, password TEXT)" ) 

Thanks in advance.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...