microsoft / azuredatastudio

Azure Data Studio is a data management and development tool with connectivity to popular cloud and on-premises databases. Azure Data Studio supports Windows, macOS, and Linux, with immediate capability to connect to Azure SQL and SQL Server. Browse the extension library for more database support options including MySQL, PostgreSQL, and MongoDB.
https://learn.microsoft.com/sql/azure-data-studio
MIT License
7.58k stars 906 forks source link

Copy from results grid as SQL Values #1347

Open mikejf-pr opened 6 years ago

mikejf-pr commented 6 years ago

Feature Request/Suggestion

When selecting and copying data, it would be useful to be able to copy as SQL value strings.

eg

declare @table TABLE (
    col1 int,
    col2 varchar(20)
)
insert into @table values (1,'asdf'),(2,'qwerty'),(7,'foo')
select * from @table

instead of copying

1   asdf
2   qwerty
7   foo

we get

(1,'asdf'),
(2,'qwerty'),
(7,'foo')
linden-dsc commented 9 months ago

This would be a very useful feature. A similar option called "Script as INSERT" is available in the right-click menu of Microsoft SQL Server Management Studio, and I use it almost daily.