Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static vs dynamic sql

 
tarik el berrak
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

What's the difference between static and dynamic sql ? which must be used and why ?

Thanks
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tarik,
IBM has a good comparison. From a Java perspective, it is good to use PreparedStatements to handle your binding variables so you don't have to worry about things like date formats and SQL injection.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic