title: Declaring a Temporary Variable in Oracle Database
body: <p>i have worked previously with SQL Server and was able to learn how to create temporary variables and use them in SQL</p>
  
  <p>i used to write something like this:</p>
  
  <pre><code>declare @Student nvarchar(255)
  
  select @Student = studentname from sometable where somecondition = 1
  
  declare @teacher nvarchar(255)
  
  select @teacher = teachername from sometable2 where somecondition &gt;2
  </code></pre>
  
  <p>and then </p>
  
  <pre><code>select @student, @teacher, other columns from sometable where some condition
  </code></pre>
  
  <p>i want to do the same thing in ORACLE Database.</p>
  
  <p>Please Help!</p>