Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • 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
Marshal
Posts: 36634
475
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
Boost this thread!