Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Right-Click-Generate INSERT/SELECT/DELETE for Table

hthyme's profile image hthyme posted 3 months ago in General Permalink

Hi,

is it possible to auto generate INSERT (and other basic) DML statements for a table?

Maybe it works somehow, but I wasn't able to find it yet.

Other tools do it for example with right-clicking on a table in the database-explorer, offering 'GENERATE INSERT' (and other) statements, generating and copying the proper SQL with selected table+columns (+spaceholders for variable parts) into clipboard for further manual usage.

If it doesn't exist yet, maybe this would be a feature to be added? I found it helpful for tables with many columns when you cannot use the grid editor for some good reason. E.g. you need to run many inserts with some data you need to prepare in a texteditor upfront.

Cheers

ansgar's profile image ansgar posted 3 months ago Permalink

The query tabs have a "Columns in table xyz" tree node, which you can collapse and use to generate some basic queries: Description

hthyme's profile image hthyme posted 3 months ago Permalink

Perfect! How did I manage not to find that?

Thank you for the quick help.

ansgar's profile image ansgar posted 3 months ago Permalink

Well, I wrote it :)

Patrick-M's profile image Patrick-M posted 3 months ago Permalink

Well, I wrote it :) You are a big brain I think, can you help with my problem too? It's in the forum just below this post and it's called "Creating user not working PostgresSQL"

Please login to leave a reply, or register at first.




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.