Considering the following script (with SQL Server 2017):
declare @mytable as table (n int identity(1,1), name varchar(10),mydate date)
insert into @mytable(name,mydate) values('a','01/01/2019')
select * from @mytable t1
cross apply (select * from t1 ) t2;
select *,mydate from @mytable t1
cross apply (select * from t1 ) t2
How do you explain that
I'm getting 5 rows
Columns 1 and 2 are named c1 and c2 instead of original names in
@mytable
I'm not getting mydate in script one and I am getting it only if I write it (
*
is not sufficient)"this is a text" is returned in rows 2 to 5 => how do you explain that?