Execute_query command is used-fetch all the records for current database data block in Oracle Forms, actually its EXECU TES query in the current data block. Syntax Execute_query;
Clears the current block, opens a query, and fetches a number of selected records.
execute_query (Keyword_one VARCHAR2);
Execute_query (All_records) performs the same actions as Execute_query but Oracle Forms fetches all of the selected RECORDS .
execute_query (Keyword_two VARCHAR2);
Execute_query (All_records, for_update) performs the same actions as execute_query but it lock all of the selected RECORDS Immediately and fetches all of the selected records.
execute_query (Keyword_one VARCHAR2, Keyword_two VARCHAR2);
execute_query (Keyword_one VARCHAR2, Keyword_two VARCHAR2, locking VARCHAR2);
Can is set to no_wait anytime this for_update parameter. When your use is no_wait, Oracle Forms displays a dialog to notify the operator if a record cannot is reserved for update imme Diately. Without the no_wait parameter, Oracle Forms keeps trying to obtain a lock without letting the operator cancel the process. Example
BEGIN
Go_Block(‘yourblock‘);
Execute_Query;
END;
Earlier I has given many example to perform query in Oracle Forms and below is the links that you can check for more Det Ails. Define Custom Query Criteria before performing query in Oracle formsif Value Exists then Query Else Create New Record Exam ple Oracle formssorting Data Block on Query in Oracle Forms
Oracle Forms execute_query Example to Fetch the Records from Database