• 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
Sheriff
Posts: 36032
432
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!