Is there a website where I can insert a SQL Insert statement and break it down by column?

I am working on an application that does not have a visible level of access to data, so all SQL statements are simply built-in as strings and executed. I constantly come across very long INSERT statements, where I am trying to figure out which value in the VALUES list matches which column in the list of column names.

I was going to create a small helper application in which I could insert an INSERT statement and show me a list of values ​​mapped to column names for debugging only, and I thought, "Maybe someone else has done this already."

Does anyone know a website where I can simply insert an INSERT statement and show it a table with two columns with column names in the first column and values ​​in the second column?

+3
source share
4 answers

not a website, but you tried either a visual studio or Sql Server Management studio. Both of them are capable of doing this.

+5
source

For this, you can use SQL Server Management Studio or Visual Studio (using Server Explorer). For SSMS, follow these steps:

  • In a random table, click "Edit Top Rows"
  • Open the SQL panel and paste the script tab into it.
  • Open the criteria panel, which displays pairs of input column values.
+2

Red Gate SQL Prompt .

, ( ), , , :

INSERT INTO tbl
SELECT 2 * y
FROM other_tbl

:

INSERT INTO tbl (x)
SELECT 2 * y AS x
FROM other_tbl
0
source

Source: https://habr.com/ru/post/1743817/


All Articles