Example 1: Summarize the columns in the EMPLOYEE
table
This is a simple example to show how you can ask questions about the structure of your database. You can ask the chat participant to summarize the columns in a table.
Install GitHub Copilot from the VS Code Marketplace.
Install the Db2 for IBM i extension from the VS Code Marketplace.
Connect to your IBM i system using the Code for IBM i extension.
Once connected, the @db2i
chat participant is available in the chat window. You can ask questions about your database, and get help with writing SQL queries.
Once GitHub Copilot is installed, you can ask questions about your database using the @db2i
chat participant. Here are some examples:
Example 1: Summarize the columns in the EMPLOYEE
table
This is a simple example to show how you can ask questions about the structure of your database. You can ask the chat participant to summarize the columns in a table.
Example 2: Ask to find out what objects are related to employee
?
This example shows how you can ask the chat participant to find out what objects are related to the employee
table. The chat participant will return a list of related objects, including the department
table.
It will tell you if it can’t get the related objects or if there are none.
Example 3: Try out a follow up question.
The screenshots that after the participant has responsed, it will sometimes offer some additional follow up questions. Simply clicking on one of these will ask the question to the chat participant.
Example 4: Using our ‘Run SQL statement’ tool to summarize information.
This example shows how you can use the Run SQL statement
tool to ask information about the data in your system. Before the tool will run any SQL statement, it will ask you to confirm that you want to run the SQL statement. This is a safety feature to prevent you from running SQL statements that could modify your data.
To use the tool, you can either reference it by tagging #result
in your request, or by using the paperclip icon to attach Run SQL statement.
It will then take the result set of the statement and summarize the information based on your request.