Sujeet Raman

Sujeet Raman

  • 862
  • 927
  • 353.9k

How to make normal sql query to dynamic sql query?

Sep 2 2020 2:13 AM
Hi i have normal sql query like:
  1.  'SELECT @studentKey = studentKey , @teacherKey = teacherKey , @name= name, @course= course, @stnumber= stnumber FROM  #temptbl  WHERE ID = @id'   
  2.    
  3. @studentKey int  
  4. @teacherKey  int  
  5. @name VARCHAR(4000),  
  6. @course VARCHAR(4000),  
  7. @stnumber int  
  8. @id int

Answers (1)