DECLARE @v_firma varchar
(20
), @v_mesto varchar
(15
)
DECLARE kk2 CURSOR FOR
SELECT firma, mesto
FROM zakaznici
OPEN kk2
FETCH kk2 INTO @v_firma, @v_mesto
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT
'Firma ' + @v_firma +
' sídli v ' + @v_mesto
FETCH kk2 INTO @v_firma, @v_mesto
END