Post

Does anyone know what's the result of the following code. This was a #SQL #InterviewQuestion I had yesterday.

      CREATE FUNCTION fn_InsertarPedidoMal (@PedidoId INT, @ClienteId INT, @Total DECIMAL(10,2))
RETURNS INT
AS
BEGIN
    -- Esto NO está permitido en SQL Server
    INSERT INTO Pedidos (PedidoId, ClienteId, FechaPedido, Total)
    VALUES (@PedidoId, @ClienteId, GETDATE(), @Total);

    RETURN 1;
END;
    
Nelson
Nelson

Nelson

Gamer/Developer

We are a specialized tool that integrates you into a private Circle of 5 people. It's a shared responsibility system for founders, developers, and students.

Developed in EU