2108 solutions found
Page 98 of 106votes
I have a `.sql` file with an export from `phpMyAdmin`. I want to import it into a different server using the command line. I have a [Windows Server 2008][1]...
votes
If user input is inserted without modification into an SQL query, then the application becomes vulnerable to [SQL injection][1], like in the following example:...
votes
What are the technical reasons for why one shouldn't use `mysql_*` functions? (e.g. `mysql_query()`, `mysql_connect()` or `mysql_real_escape_string()`)?...
votes
I am trying to install version 1.2.2 of `MySQL_python`, using a fresh virtualenv created with the `--no-site-packages` option. The current version shown in PyPi...
votes
I have this table for documents (simplified version here): | id | rev | content | |------|-------|-----------------------...
votes
How can I ***reset*** the `AUTO_INCREMENT` of a field? I want it to start counting from `1` again.
votes
Using `MySQL`, I can do something like: SELECT hobbies FROM peoples_hobbies WHERE person_id = 5; **My Output:** shopping fishing codi...
votes
Is there an easy way to run a MySQL query from the Linux command line and output the results in [CSV][1] format? Here's what I'm doing now: ```lan...
votes
I'm using the MySQL command-line utility and can navigate through a database. Now I need to see a list of user accounts. How can I do this? I'm using...
votes
Since MySQL doesn't seem to have any 'boolean' data type, which data type do you 'abuse' for storing true/false information in MySQL? Esp...
votes
<!-- ***** IMPORTANT INFORMATION ABOUT THE QUESTION TITLE ***** There has been a lengthy discussion about this title at the URL below. Do not make any tit...
votes
There is a table `messages` that contains data as shown below: Id Name Other_Columns ------------------------- 1 A A_data_1 2...
votes
Between `utf8_general_ci` and `utf8_unicode_ci`, are there any differences in terms of performance?
votes
I want to update the column `visited` to give it the value 1. I tried this command in the SQL editor inside MySQL workbench: UPDATE tablename SET columnn...
votes
I can run this query to get the sizes of all tables in a MySQL database: show table status from myDatabaseName; I would like some help in understandin...
votes
I want to add a row to a database table, but if a row exists with the same unique key I want to update the row. For example: ```sql INSERT INTO table_nam...
votes
How do I quickly rename a MySQL database (change its schema name)? Usually I just dump a database and re-import it with a new name. This is not an option for...
votes
I am an old-school MySQL user and have always preferred `JOIN` over sub-query. But nowadays everyone uses sub-query, and I hate it; I don't know why....
votes
For simplicity, assume all relevant fields are `NOT NULL`. You can do: SELECT table1.this, table2.that, table2.somethingelse FROM...
votes
I started by googling and found the article *[How to write INSERT if NOT EXISTS queries in standard SQL][1]* which talks about mutex tables. I have a table w...