Tag Info

New answers tagged

1

If you want to drop the index that you created previously, the correct statement would be: alter table bill_item drop index idx_comp; created_date is the name of one of the columns in your table bill_item.


1

Downgrade to 6.2; 6.3 has the bug you describe.


2

Remove all occurence of COMMENT ''. Feel free to leave a comment under this bug. We're working on it to fix it, so stay tuned for upcoming release.


0

I recently converted an Oracle DB into MySQL using a program called DBConvert There is a free version that inserts watermarks into large tables, but that can be fixed. ;) It's not perfect and might take some tinkering to fix up after the conversion.


0

Whist there were a number of useful comments and answers as mentioned in a previous comment of mine the problem was caused a rougue entry which would have corresoned to a PK of zero!. Deleting this solved the problem... How it got there is the issue...


0

Assuming you have no references to fred elsewhere, this may be the 'safe' way: ALTER TABLE bill DROP COLUMN fred, ADD COLUMN fred INT AUTO_INCREMENT NOT NULL PRIMARY KEY;


3

This is a bug on MySQL Workbench >=6.3.* reported in these cases #76578 and HERE. This is what ALTER TABLE do: It adds a COMMENT '' on every line of the SQL Script to apply: I recommended you to downgrade your MySQL Workbench to 6.2.* until they fix this. Tested in Ubuntu LTS 14.04 and MySQL Workbench 6.3.4.0.


2

Your post intrigued me. There is a "workaround" here, but I was curious, so I performed the following tests. You might like to try what worked for me below before trying the workaround. If there are FOREIGN KEYs, and potential conflicts (duplicates and/or KEY violations), then this won't work. It may be the reason for your error. I created a table (bill) as ...


0

Do you already have all the Airports? Some of them? None of them? The details depend on which case you are doing. Two steps (per normalization table): INSERT...SELECT DISTINCT ... LEFT JOIN .. WHERE .. IS NULL to add to normalization table. Then UPDATE ... SELECT ... JOIN... to get the ids back. The code here is aimed at the "some of them" case, bu ...


0

The problem is from this part of the SQL code. The Foreign Key constraint definition is missing the column to be used: CREATE TABLE IF NOT EXISTS `db`.`ArticleNote` ( `ArticleNoteID` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, --- --- several lines removed --- CONSTRAINT `fk_ANote_Employee` FOREIGN KEY () --<-- missing ...


1

Probably they are not both CHARACTER SET utf8 and COLLATE utf8_general_ci. I strongly suspect you do not need utf8 for an employeeId. I recommend you explicitly make that column CHARACTER SET ascii COLLATE ascii_bin (or ascii_general_ci if you need case folding) if you don't have any accented or Chinese (etc) characters in the ids. What you have (CHAR(21) ...


0

I want to do the same. Get the FK in model and do not synchronize them to my DB. I'm using MyISAM for performances (10 times faster in my case). Any answer ?



Top 50 recent answers are included