Are you getting the little red squiggly lines on your code in SQL Server Management Studio? You may need to refresh the intellisense cache. There are two ways to do this:
1. CTRL + SHIFT + R .
2. or use the menu EDIT / Intellisense / Refresh Local Cache