Manipulación bases de datos
Crear Bases de datos
Create tables
NOTE: for making an auto-increment to the primary key you should use: SLQ Server - Identity(1,1) => incrementa la variable asociada en 1 por cada registro. MySQL - auto_increment => increase the associated data-variable in one. If you don’t use a method for auto-increasing you will have an error in your script.
ID_USUARIO => It is the primary key
USUARIO, NOMBRE, TELÉFONO => Those are fields that fills up our table
NOTE: you must specify the type of the variable that every field has, it is a good practice also to define how long the field would be, it means, how many characters will have.
Insert data at tables
If you are creating a table and you’re gonna fill in the fields, you should use the method INSERT to do it.
Cautions:
You must make sure that the PRIMARY KEY value is auto-incremental or you’re gonna receive an error.
You must insert as many fields you had created, otherwise you will receive an error message
Comentarios
Publicar un comentario