Show me the path of the data files and log files of the adventureworks2019 database Now I want to get the path of the data files and log files. SELECT (size * 8)/1024 AS 'Size in MB' FROM sys.database_files Show me the MB used by the Adventureworks2019 database Now, we will get some information about the data files. SELECT SERVERPROPERTY('Edition') AS 'SQL Server Edition' Getting Database information This is great, but I need a column name for the result. Show me only the edition and no other information 5 (X64) 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows 10 Pro 10.0 (Build 19045: ) (Hypervisor) The current result is too long: Microsoft SQL Server 2019 (RTM). SELECT is OK, but I only want the edition. Secondly, I will ask about the SQL Server edition. Show GitHub Copilot SQL Server informationįirst, I will ask some system database queries. I will provide a path, maybe it needs more information: -BACKUP the adventureworks database in the c:\backup folderĪnd the answer was the same… BACKUP DATABASE adventureworks2019įrustrated by the previous results, I decided to give it a last chance. It was disappointing: INSERT INTO Players2 ('John', PlayerAge, PlayerPosition, PlayerTeam)Īlso, I asked to backup the adventureworks2019 database: -backup the database adventurewoks2019 It doesn’t seem to be smart enough to insert data. I will ask Copilot to generate data: -Add real values to the table Players2 You only need to write comments and it will show you the code. Let’s start with something simple: -Create a SQL Server table with players.Ĭopilot will generate the code and with TAB and ENTER you can accept the suggestion: CREATE TABLE Players2 ( Using GitHub copilot is a straightforward process. Press the Button and then press the Authorize Visual-Studio-Code button. You will be sending a message to authorize GitHub for VS Code. This is a question that pops up, but you can skip this if you want. This is next to the extension in the blade, as shown here.Īlso, select SQL as the language to use for the file. Secondly, Install the extension by pressing the Install button. First, go to Extensions and search for GitHub Copilot. Once you have your subscription, we will install it in Visual Studio Code. Install GitHub Copilot in Visual Studio Code Even when you are on a free trial, you will need to set up your credit card or send PayPal information. For more information about prices, go to the Copilot page. After that, there is an option to pay 10 dollars per month. I will use a trial option for 1 month to test it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |