Tuesday, June 20, 2017

Advantages of working with PreparedStatement || Java High Q



Advantages of working with PreparedStatement:
               



               a)      Allows to deal with precompiled SQL Query
               
               b)      Allows to place parameters  (?) in the SQL Query
               
               c)      Suitable to execute same query for multiple times either with same values or different  
                       values.
               
              d)     Allows to set values to query param in java style(no need of converting input values as  
                     required for SQL Queries).
              
             e)      Does not raise SQL Injection problem.
             
             f)       Suitable for inserting date values.
            
             g)      Suitable for inserting large obj.
           
            h)      Reduces the network traffic between java application and between java application  
                   and DataBase s/w and etc.

No comments:

Post a Comment