When developers working with SQL Server “Denali”, MS SQL Server 2008 R2 and MS SQL Server 2005 want to copy a query, they should follow the next steps:

C# 8.0 and .NET Core 3.0 – Modern Cross-Platform Development: Build applications with C#, .NET Core, Entity Framework Core, ASP.NET Core, and ML.NET using Visual Studio Code, 4th Edition
ASP.NET Core 3 and Angular 9: Full stack web development with .NET Core 3.1 and Angular 9, 3rd Edition
C# in Depth, 4th Edition

1. From the View menu, click Solution Explorer.

2. In Solution Explorer, right-click the query they want to copy and from the shortcut menu choose Open.

3. In the SQL pane, copy the portion of the query they want to copy.

4. Create a new query or open the query where they want to paste the copied SQL.

5. Position the cursor where they want to add the SQL code.

6. Right-click and from the shortcut menu click Paste.