Will Mssql be even fast when I query on a view opposed to one query?
example
When I have this view:
create view ViewInvoicesWithCustomersNam
A view is simply a macro that is expanded/unnested into the main query. So these are equivalent.
Note: if customername is in the Customer table, you've actually created an INNER JOIN. To filter for Bart's invoices and invoices with no customer you'd need to do this:
select
*
from
Invoices
left join
Customer on Customer.ID=Invoices.CustomerID and customername="Bart"