Edit multiple columns
Answered
I hope i'm on the right forum.
I'm using Datagrips to browse the information in my database, and I can't find the way to edit multiple rows at once. So for example I have a Partners table and a registration_type_id column. I want to set the status of all the partners to '1' but if I select all the status cells, and type '1' then only the last one selected will change value. Is there a way to do this from the gui?
Please sign in to leave a comment.
Hello, please tell me DataGrip version you are running. Just checked latest 2019.3.3 and this works as expected, you select multiple rows, type a value and it appears in all selected cells.
I have the same problem for integer rows. For text it works as before.
IntelliJ IDEA 2019.3.3 (Ultimate Edition)
Build #IU-193.6494.35, built on February 11, 2020
Runtime version: 11.0.5+10-b520.38 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.5.7-1-MANJARO
Can you please tell us which database you are using and send a DDL for a table where you have this issue?
PostgresSQL 9.6/12
Here's the sample DLL, I cannot modify the season/episode column in bulk.
I checked on DataGrip 2020.01, it works for columns that have string values, but for integer columns it does not. Here's a DDL for a table I can't edit:
```
create table clients
(
id bigint unsigned auto_increment
primary key,
name varchar(100) not null comment 'Client name',
name_kana varchar(100) not null comment 'Client kana name',
industry_type_id tinyint unsigned not null comment 'Client industry type',
last_day_to_charge tinyint unsigned null,
pay_in_month_id tinyint unsigned not null,
last_day_to_pay tinyint unsigned null,
api_link_senses varchar(255) null comment 'Api link',
number_of_employees int unsigned null comment 'Number of employees for this Client',
stock_status_id int unsigned default 1 not null comment 'Status of the stock for this Client''s company',
charge_type tinyint unsigned not null,
pay_type tinyint unsigned not null,
note varchar(1000) null comment 'Note for this client',
created_at timestamp default CURRENT_TIMESTAMP not null,
updated_at timestamp default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP,
deleted_at timestamp null
)
collate=utf8mb4_unicode_ci;
```
Columns like industry_type_id or last_day_to_charge, I have to edit row by row, which is quite troublesome.
Hello, I have the same issue. any update?
Hello
Got same problem, but are using an workaround.
1) Change one value to "1"
2) Copy that value
3) Mark all the fields you want to change.
4) Paste the value in.
Saved me a lot of time!
I would love to see this feature, which works well for string variables, available for other field types as well.
Hello Christoph,
It's already possible to edit multiple numeric (and other types) cells at once. I've just checked it in DataGrip 2021.2.4
Though this feature is disabled for columns with unique indexes (including primary keys)
What IDE version do you use?
Hello Ludmilla,
I tried versions 2021.2.4 and 2021.3 EAP for macOS. Only the last marked value is changed.
and what is you database?
SQLite. I have performed some additional tests. It seems to be only a problem with columns of type UNSIGNED INT. It may be related to a problem I have already reported (request #3566450).
It works for column 1 (int), column 2 (varchar), but not for column 3 (unsignedInt)
Reproduced. Thanks!
I've already found the cause.
It will be fixed in next release - 2021.3
Many, many thanks! You guys are amazing!
I have the same problem now when I switched to PSQL15 and replaced an unique index which used coalesced to use new `NULL NOT DISTINCT` index feature. Not sure why this feature would be disabled in a table has an unique index involving multiple columns, editing just one of them doesn't necessarily break the constraint. And if anything you'd get back a PSQL error if you break the constraint anyway, so not sure why to restrict such useful feature.
Hi Paulius Papl,
What is your current IDE version, and could you also provide a DDL of the data objects in question?