Skip to content

Instantly share code, notes, and snippets.

@rugi
Created April 12, 2023 00:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rugi/e21ca19bea35e920366c47ab6f260e3f to your computer and use it in GitHub Desktop.
Save rugi/e21ca19bea35e920366c47ab6f260e3f to your computer and use it in GitHub Desktop.
SQL Standar. Creación de tabla, inserción y recuperación de registros.
#Se selecciona nuestra bbdd
USE demo001;
#Creamos nuestra tabla
CREATE TABLE COLORES(
ID int,
NOMBRE varchar(100),
RGB varchar(6)
);
#agregamos 3 registros
INSERT INTO COLORES (ID, NOMBRE, RGB) VALUES (1,'Rojo','FF0000');
INSERT INTO COLORES (ID, NOMBRE, RGB) VALUES (2,'Verde','00FF00');
INSERT INTO COLORES (ID, NOMBRE, RGB) VALUES (3,'Azul','0000FF');
#Los mostramos
Select * from COLORES
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment