Created
September 27, 2022 12:23
-
-
Save damianpumar/d3bcd10cc97976196d1bb0695d2c5ab3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE Articulos ( | |
[ID] INT IDENTITY (1, 1) NOT NULL, | |
[CodigoBarras] NVARCHAR (100) NOT NULL, | |
[Descripcion] NVARCHAR (400) NOT NULL, | |
[PrecioCosto] DECIMAL (18, 2) NOT NULL, | |
[PrecioVenta] DECIMAL (18, 2) NOT NULL, | |
[StockDisponible] INT NOT NULL, | |
[FechaAlta] DATETIME NOT NULL, | |
CONSTRAINT [PK_Articulos] PRIMARY KEY CLUSTERED ([ID] ASC) | |
); | |
SELECT * FROM Articulos | |
INSERT Articulos (CodigoBarras, Descripcion, PrecioCosto, PrecioVenta, StockDisponible, FechaAlta) VALUES ('123', 'Artículo de ejemplo', 2, 5, 1, GETDATE()) | |
SELECT * FROM Articulos | |
UPDATE Articulos | |
SET CodigoBarras = '12345' | |
WHERE ID = 1 | |
SELECT * FROM Articulos | |
INSERT Articulos (CodigoBarras, Descripcion, PrecioCosto, PrecioVenta, StockDisponible, FechaAlta) VALUES ('aaabbb', 'Artículo de ejemplo', 2, 5, 1, GETDATE()) | |
SELECT * FROM Articulos | |
DELETE Articulos |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment