title: TimeStamp in sql
body: <p>I have a table named Table1 which contains an ID and TimeStamp.</p>
  
  <p>Table structure</p>
  
  <pre><code>ID  TimeStamp 
  1   0x0000000000047509 
  </code></pre>
  
  <p>But when I compare the combination of these fields, it always shows false. What is the reason for this?</p>
  
  <p>My Query is :</p>
  
  <pre><code> DECLARE @ID int 
   DECLARE  @TimeStamp  timestamp 
  
   SET @ID = 1 
   SET @TimeStamp = 0x0000000000047509 
  
   If EXISTS(SELECT 1 FROM Table1 WHERE ID = @ID AND TimeStamP = @TimeStamp) 
  
   BEGIN 
         SELECT 1 AS RetVal 
   END 
  
   ELSE 
  
   BEGIN 
         SELECT -1 AS RetVal     
   END 
  </code></pre>
  
  <p>This will simply work in a Query analyzer.But this will not work in a stored Procedure. Any solution for this?</p>