I see developers often confused on how they get the list of objects by IntelliSense when writing the code. Here are some points on how you can intelligently make use of IntelliSense.
When IntelliSense is enabled, in the query window, type SELECT and a space and hit Control+Space. You will see something like below
Do you know what are listed out? It lists out all objects that can follow a SELECT statement. ie all that can be immediately followed by SELECT keyword. The list includes the variables, global variables, tables, scalar udf, etc. In this list you will not see any objects that can not be SELECTed (eg Stored Procedure, extended stored procedures,etc)
If you scroll down the list, you can see the list of system functions
If you scroll down the further, you can see the tables too
If you select the table and type a dot, you can see the list of available columns for that table as shown below
Similarly see what happens when you type EXEC and a space and hit Control+Space. You will see something like below
If you scroll down the further, you can see the stored procedures too
As you see it will list out all objects that can be part of EXEC.
This way you can effectively make use of IntelliSense to know the available objects based on what context you are in. If you don’t how why the object lists is not always same just think about the above points.
Note: If the images are not clear, please click on them for larger view