• Post Reply Bookmark Topic Watch Topic
  • New Topic

static vs dynamic sql  RSS feed

 
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
Sheriff
Posts: 37395
531
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!