Sample data setup:
DROP TABLE #Table1
CREATE TABLE #Table1 (id int, value int)
INSERT INTO #Table1 (id, value) VALUES
(1, 11),
(2, 12),
(3, 13),
(4, 14)
DROP TABLE #table2
CREATE TABLE #table2 (id1 INT, value1 INT)
INSERT INTO #table2 (id1, value1) VALUES
(1, 21),
(2, 22),
(1, 31),
(2, 32)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden