title: Select all values in a column from SQL Server 2008 database?
body: <p>Could someone tell me how to get all the values in a column from my SQL Server database?</p>
  
  <p>I have a table with the following structure:</p>
  
  <p><strong>ELECTS</strong></p>
  
  <ul>
  <li><code>SSN     int</code> (primary key)</li>
  <li><code>NAME    varchar(20)</code></li>
  <li><code>PROGRAM varchar(max)</code></li>
  <li><code>PHOTO   varchar(max)</code></li>
  </ul>
  
  <p>And I want to retrieve all values from the <code>SSN</code> column and store them in an integer array in an ASP.NET project.</p>
  
  <p>I using Visual Studio 2010 Ultimate SP1 2010 and SQL Server 2008 SP3.</p>