SQLRPGLE Interview Questions (1)
SQLRPGLE Interview Questions (1)
What is SQLRPGLE?
SQLRPGLE is a combination of SQL and RPGLE (RPG IV) used to access and manipulate data
on the IBM i (AS400) system. It allows embedding SQL statements in RPG programs for
database operations like SELECT, INSERT, UPDATE, and DELETE.
What are the differences between Embedded SQL and Dynamic SQL in SQLRPGLE?
| **Embedded SQL** | **Dynamic SQL** |
|------------------------------|-------------------------------|
| SQL is hardcoded in the program. | SQL is constructed at runtime. |
| Easier to debug and maintain. | Useful for dynamic query generation. |
| Better performance. | Flexible for variable queries. |
What is the difference between FETCH FIRST n ROWS ONLY and LIMIT?
- `FETCH FIRST n ROWS ONLY` is ANSI standard and preferred in DB2.
- `LIMIT` is specific to some databases but not always supported in DB2.