Find known geographic points inside a polygon


I have a database full of companies and their geographic location.
What I would like to do is create polygons / areas of multiple points (in my visual studio) and based on those 3-4-5-.. points . I’d like to find out which companies from my database are inside this polygon. How can I do this?

The only thing i need to know is what spatial function I need to use to know if a point is inside or outside the area/polygon


thanks for reading,


Look in Books Online for STIntersects() This will work for geography and geometry types./

What is the difference then with STWithin?

STWithin determines if one item is completely within another.  STIntersects will tell you if there is any intersection.