May 3, 2013 Leave a comment
Let’s say I have a table called States with the following columns and data.
Now let’s say I need to create a virtual table that consists of the ID and Abbreviation columns only. I can do this by using the “with” keyword. Here’s an example:
with myVirtualTable as ( Select ID, Abbreviation From States ) select * From myVirtualTable
Here are the results: