Results 1 to 3 of 3

Thread: Dynamic Query

  1. #1
    Contributing Member
    Join Date
    Jul 2006
    Answers
    76

    Dynamic Query

    Can someone tell me what does the term dynamic query means? I want to know how to implement dynamic queries. A brief explanation on this in this discussion would help me.


  2. #2
    Junior Member
    Join Date
    Oct 2006
    Answers
    24

    Re: Dynamic Query

    Most database applications do a specific job. For example, a simple program might prompt the user for an employee number, then update rows in the EMP and DEPT tables. In this case, you know the makeup of the UPDATE statement at precompile time. That is, you know which tables might be changed, the constraints defined for each table and column, which columns might be updated, and the datatype of each column.

    However, some applications must accept (or build) and process a variety of SQL statements at run time. For example, a general-purpose report writer must build different SELECT statements for the various reports it generates. In this case, the statement's makeup is unknown until run time. Such statements can, and probably will, change from execution to execution. They are aptly called dynamic SQL statements.

    Unlike static SQL statements, dynamic SQL statements are not embedded in your source program. Instead, they are stored in character strings input to or built by the program at run time. They can be entered interactively or read from a file.


  3. #3
    Contributing Member
    Join Date
    Jul 2006
    Answers
    76

    Re: Dynamic Query

    I got a brief idea on the concept of Dynamic Query .But if you could kindly provide a example I will try the same and get the concept even more clearer.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact