-
Contributing Member
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.
-
Junior Member
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.
-
Contributing Member
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
-
Forum Rules