create from dbo.fromExample
as
from dbo.Customers c
join dbo.Invoices i
on c.CustomerID = i.CustomerID
now you can use it as follows:
select c.CustomerID, i.InvoiceNo
from dbo.fromExample
I find I reuse FROM clauses alot
and reusing a "base query" requires writing a very large and cumbersome
select clause
as
from dbo.Customers c
join dbo.Invoices i
on c.CustomerID = i.CustomerID
now you can use it as follows:
select c.CustomerID, i.InvoiceNo
from dbo.fromExample
I find I reuse FROM clauses alot
and reusing a "base query" requires writing a very large and cumbersome
select clause
Comment