2108 solutions found
Page 39 of 106votes
What does "unsigned" mean in MySQL and when should I use it?
votes
I know I can issue an alter table individually to change the table storage from MyISAM to InnoDB. I am wondering if there is a way to quickly change all of t...
votes
How do I sort a MySQL table by two columns? What I want are articles sorted by highest ratings first, then most recent date. As an example, this would be...
votes
I connect to `mysql` from my Linux shell. Every now and then I run a `SELECT` query that is too big. It prints and prints and I already know this is not what I...
votes
I really haven't found normal example of PHP file where MySQL transactions are being used. Can you show me simple example of that? And one more question...
votes
`table1` is the parent table with a column `ID` and `table2` has a column `IDFromTable1`. Why when I put a FK on `IDFromTable1` to `ID` in `table1` do I get...
votes
I want to convert a `timestamp` in MySQL to a date. I would like to format the user.registration field into the text file as a `yyyy-mm-dd`. Here is my SQL:...
votes
In my production error logs I occasionally see: > SQLSTATE[HY000]: General error: 1205 > Lock wait timeout exceeded; try > restarting transaction...
votes
I have a column of type "datetime" with values like 2009-10-20 10:00:00 I would like to extract date from datetime and write a query like: S...
votes
Is it possible to `GROUP BY` more than one column in a MySQL `SELECT` query? For example: GROUP BY fV.tier_id AND 'f.form_template_id'
votes
**In a nutshell** I want to run mysql in a docker container and connect to it from my host. So far, the best I have achieved is: ERROR 2002 (HY000): C...
votes
I want to remove constraints from my table. My query is: ALTER TABLE `tbl_magazine_issue` DROP CONSTRAINT `FK_tbl_magazine_issue_mst_users` But...
votes
I changed the datadir of a MySQL installation and all the bases moved correctly except for one. I can connect and `USE` the database. `SHOW TABLES` also retur...
votes
I was wondering what the difference between `BigInt`, `MediumInt`, and `Int` are... it would seem obvious that they would allow for larger numbers; however, I c...
votes
I'm using a MySQL database. In which situations should I create a unique key or a primary key?
votes
What MySQL query will do a text search and replace in one particular field in a table? I.e. search for `foo` and replace with `bar` so a record with a field...
votes
I have created tables in MySQL Workbench as shown below : **ORDRE table:** CREATE TABLE Ordre ( OrdreID INT NOT NULL, OrdreDato DA...
votes
I tried to import a large sql file through phpMyAdmin...But it kept showing error >'MySql server has gone away' What to do?
votes
Usually I use manual find to replace text in a MySQL database using phpMyAdmin. I'm tired of it now, how can I run a query to find and replace a text with n...
votes
MySQL has an <a href="http://dev.mysql.com/doc/refman/5.1/en/optimize-table.html">OPTIMIZE TABLE</a> command which can be used to reclaim...