• create procedure inserttable1

    @phone int,

    @name varchar(30)

    as

    insert table1

    select @phone,

    kod

    from table2

    where nam_d = @name

    go