Can Microsoft Copilot Write Simple SQL Commands for You?

6 months ago 50

According to the claims made by ample exertion companies, generative artificial quality platforms like Microsoft Copilot volition marque the moving lives of radical astatine each levels of a concern enactment much productive and efficient. But is that conscionable hyperbole, oregon bash the claims person immoderate merit?

For example, tin the escaped mentation of Microsoft Copilot, disposable to each Windows users, constitute a communal SQL query for you connected command? That quality would beryllium highly utile for a time-constrained, less-experienced worker trying to conscionable a deadline. Below, we research what happens erstwhile we inquire Microsoft Copilot for immoderate SQL help.

DOWNLOAD: AI speedy glossary from TechRepublic Premium

Testing Microsoft Copilot’s quality to constitute elemental SQL commands

For our experiment, we started with thing basal and simple. Using Creative mode, we asked Microsoft Copilot for the codification required to make a array successful SQL named Employee that included 4 columns: EMP_ID, Name, Salary, Age. The AI provided this code:
CREATE TABLE Employee (


EMP_ID INT PRIMARY KEY,
Name VARCHAR(100),
Salary DECIMAL(10, 2),
Age INT

);

You tin spot the punctual and codification successful Figure A.

Asking Microsoft Copilot however  to make  a elemental  SQL table.Figure A: Asking Microsoft Copilot however to make a elemental SQL table. Image: Mark W. Kaelin

While this codification would apt necessitate tweaking depending connected your circumstantial needs, successful general, the codification was close and utile based connected what was asked of Copilot.

Note the mentation provided by Microsoft Copilot arsenic well; it is arsenic important arsenic the code:

“This connection defines EMP_ID arsenic an integer and the superior cardinal for the table, Name arsenic a adaptable quality drawstring with a maximum magnitude of 100 characters, Salary arsenic a decimal with 10 digits successful full and 2 digits aft the decimal point, and Age arsenic an integer. Adjust the information types and sizes according to your circumstantial requirements.”

Continuing our league with Microsoft Copilot, we past asked the AI to make the codification indispensable to insert a caller grounds into this table. The resulting codification is below:

INSERT INTO Employee (EMP_ID, Name, Salary, Age) VALUES (1, 'John Doe', 55000.00, 30);

You tin spot the punctual and codification successful Figure B.

Asking Microsoft Copilot however  to insert a grounds   into a SQL table.Figure B: Asking Microsoft Copilot however to insert a grounds into a SQL table. Image: Mark W. Kaelin

The VALUES conception would request to beryllium modified for your circumstantial needs, but the codification and the mentation provided by Copilot were close and useful. It’s important to enactment that erstwhile our array of employees is complete, we whitethorn beryllium tasked with penning queries to propulsion information from our database.

Next successful our league with Microsoft Copilot, we asked the AI to make the codification indispensable to database employees from this array with a definite property oregon greater. In this case, Microsoft Copilot suggested this code.

SELECT * FROM Employee WHERE Age >= 30;

You tin spot the punctual and codification successful Figure C.

 Mark W. KaelinFigure C: Asking Microsoft Copilot to prime records from a SQL table. Image: Mark W. Kaelin

Again, portion you whitethorn request to set the codification for your circumstantial needs, this codification was close and utile for employees little acquainted with SQL syntax.

So, erstwhile asked the close way, Microsoft Copilot tin constitute basal SQL codification for your employees. However, immoderate answers are generated by Copilot should ever beryllium scrutinized for applicability and accuracy.

DOWNLOAD: AI vs instrumentality learning differences and usage cases from TechRepublic Premium

What person we learned astir Microsoft Copilot and SQL codification generation?

We tin gully these conclusions from our experimentation with Microsoft Copilot:

  • Under the close conditions, and erstwhile asked the close questions, Copilot tin supply utile and close SQL commands that employees tin use to their enactment tasks.
  • The escaped mentation of Microsoft Copilot derives its “knowledge” by modeling information from Bing searches and the internet. Tutorials explaining basal SQL commands and offering SQL tips are communal connected the internet. Those 2 conditions mean asking Copilot astir SQL commands returns is much apt to instrumentality utile answers. However, asking astir topics not prevalent oregon not explored connected the net whitethorn not beryllium arsenic successful.
  • Relying connected information generated from the net for concern decisions tin beryllium a risky activity. The net is infamous for inaccurate and misleading information, and answers provided by Microsoft Copilot, successful definite situations, could beryllium tainted by these inaccuracies.
  • Even if the answers provided by Microsoft Copilot are useful, they inactive indispensable ever beryllium vetted and filtered by employees for accuracy and applicability. While generative AI tin beryllium a almighty tool, it should seldom beryllium trusted with making last decisions oregon acting connected its own.
  • One of the astir almighty aspects of Microsoft Copilot sessions is the AI’s quality to iterate answers. In our example, we were capable to usage Copilot’s erstwhile answers to our questions arsenic a foundational ground for our adjacent questions. This capableness allows employees to person a speech with the AI and past physique toward the astir close and utile answer.
  • Our illustration besides shows that the much elaborate the question submitted to Microsoft Copilot, the much close the generated answer. By including adaptable names, Copilot was capable to supply implicit answers and not conscionable wide SQL bid tips. The quality to formulate elaborate questions is what separates a elemental hunt from a utile Copilot session.
  • Using Microsoft Copilot requires an accommodation successful reasoning by employees seeking to usage it arsenic a enactment tool. Copilot is not conscionable different hunt engine, and it should not beryllium approached that way. Essentially, employees are asking Copilot to work and construe accusation disposable connected the net for them and past contiguous useful, close and viable answers to their questions. The questions employees inquire of Copilot volition beryllium fundamentally antithetic from the questions they inquire of a basal hunt engine.

Should employees spot Microsoft Copilot for enactment tasks?

We person proven that Microsoft Copilot tin beryllium a utile productivity instrumentality for your employees, but lone if it is utilized correctly. Employees indispensable recognize that Copilot, and immoderate different generative AI platform, is not conscionable different hunt engine. Questions submitted to Copilot indispensable beryllium thought out, elaborate and specific. The much elaborate the question, the much elaborate the answer. Employees indispensable besides recognize that the archetypal question is often conscionable the instauration that leads to a much utile and enlightening speech with Copilot.

Read Entire Article