Skip to content

Tag: sql

How to precompile stored procedures in SQL server?

Is there any way to pre compile stored procedures in SQL Server? My requirement goes like this.. I have some stored procedures, which take more time in compiling than executing. So I want to precompile all the stored procedures. It would be nice to precompile them when the db server is started and running. An…

Running a .sql script using MySQL with JDBC

I am starting to use MySQL with JDBC. I have 3-4 tables to create and this doesn’t look good. Is there a way to run a .sql script from MySQL JDBC? Answer Ok. You can use this class here (posted on pastebin because of file length) in your project. But remember to keep the apache license info. JDBC Script…

Condition within JOIN or WHERE

Is there any difference (performance, best-practice, etc…) between putting a condition in the JOIN clause vs. the WHERE clause? For example… Which do you prefer (and perhaps why)? Answer The relational algebra allows interchangeability of the predicates in the WHERE clause and the INNER JOIN, so e…