CREATE OR ALTER PROCEDURE sp_User_Update
    @Id INT,
    @Username NVARCHAR(50),
    @Email NVARCHAR(100),
    @NombreCompleto NVARCHAR(100)
AS
BEGIN
    SET NOCOUNT ON;

    UPDATE Users
    SET Username = @Username,
        Email = @Email,
        NombreCompleto = @NombreCompleto
    OUTPUT INSERTED.Id, INSERTED.Username, INSERTED.Email, INSERTED.NombreCompleto, INSERTED.FechaCreacion
    WHERE Id = @Id;
END
