Supposing I have two temporary tables
CREATE TABLE TableA
(
SomeValue NVARCHAR(64)
)
CREATE TABLE TableB
(
SomeValue NVARHCAR(64)
)
and a final table
CREATE TABLE TableC
(
SomeValue1 NVARCHAR(64),
SomeValue2 NVARHCAR(64)
),
what is the best way to insert into TableC
every possible combination of values from TableA
and TableB
in a high-perfomance fashion? I know cursors must be the least thing to think about, but will two WHILE
loops do it fast enough?