Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Cross Apply vs Inner Join
create table #temp1 ( col1 int ) insert into #temp1 values(6),(1),(2),(3),(null) create table #temp2 ( col1 int ) insert into #temp2 values(1),(2),(1),(2),(3),(null) select * from #temp1; select * from #temp2 select t1.col1, Sum(t2.col1) AS col1 from #temp1 t1 inner join #temp2 t2 on t1.col1 = t2.col1 GROUP BY t1.col1 SELECT * FROM #temp1 t1 CROSS apply (SELECT sum(col1) AS col1 FROM #temp2 t2 WHERE t1.col1 = t2.col1) A
run
|
edit
|
history
|
help
0
TUAN 7_QUAN LY DE TAI
While Loop in SQL Server for Multiple Entries
Demo
ankit
bc160401693
a
Create MS SQL Server CUSTOMERS Table
llaves vistas (alumnos) Karen
sqript for print !00 numbers with out loop
Xml Excercise 2