Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 28 May 2009 @ 09:55:21 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: JDBC driver and the use of the '?'
 
From:   McCall, Glenn David

This is a parameterised (or prepared) query.

A parameterised query is submitted to the database for "compilation". The values represented by the "?" placholders are supplied separately. Once all the values have been supplied, the query is run and in this case results are returned.

There are many reasons for using prepared queries. Two of these are performance and security.

This is not unique to JDBC. Prepared queries can also be used in ODBC. Positional parameters are also represented by "?" placeholders.

If you have ever used bteq to perform an import there is a similar concept. In bteq the placeholders are given names (via the using statement) rather than being positional as per the "?" placeholder. Look for an example in the bteq manual (import command).


Regards

Glenn Mc



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023