422 solutions found in database
Page 17 of 22votes
I am trying to learn the best way to write queries. I also understand the importance of being consistent. Until now, I have randomly used single quotes, double...
votes
Is there a collation type which is officially recommended by MySQL, for a general website where you aren't 100% sure of what will be entered? I understand t...
votes
Is there an SQL injection possibility even when using `mysql_real_escape_string()` function? Consider this sample situation. SQL is constructed in PHP like t...
votes
I want to create a new user in MySQL and give it full access only to one database, say `dbTest` that I create with a command like `create database dbTest;`. Wha...
votes
I want to pull out duplicate records in a MySQL Database. This can be done with: SELECT address, count(id) as cnt FROM list GROUP BY address HAVING...
votes
I've created database, for example 'mydb'. CREATE DATABASE mydb CHARACTER SET utf8 COLLATE utf8_bin; CREATE USER 'myuser'@'...
votes
I want to change the data type of multiple columns from float to int. What is the simplest way to do this? There is no data to worry about, yet.
votes
I need to check (from the same table) if there is an association between two events based on date-time. One set of data will contain the ending date-time of...
votes
I was given a MySQL database file that I need to restore as a database on my Windows Server 2008 machine. I tried using MySQL Administrator, but I got the fo...
votes
Is there a way to restrict certain tables from the mysqldump command? For example, I'd use the following syntax to dump *only* `table1` and `table2`:...
votes
What are the differences between PRIMARY, UNIQUE, INDEX and FULLTEXT when creating MySQL tables? How would I use them?
votes
When I executed the following command: ALTER TABLE `mytable` ADD UNIQUE ( `column1` , `column2` ); I got this error message: #10...
votes
I have a column containing urls (id, url): http://www.example.com/articles/updates/43 http://www.example.com/articles/updates/866 http://www.ex...
votes
What command returns the current version of a MySQL database?
votes
What is the size of column of `int(11)` in mysql in bytes? And Maximum value that can be stored in this columns?
votes
I want to execute a text file containing SQL queries, in MySQL. I tried to run `source /Desktop/test.sql` and received the error: > mysql> . \home\...
votes
How can I trace MySQL queries on my Linux server as they happen? For example I'd love to set up some sort of listener, then request a web page and view a...
votes
How do I see if my database has any indexes on it? How about for a specific table?
votes
I have a table with ~500k rows; varchar(255) UTF8 column `filename` contains a file name; I'm trying to strip out various strange characters out of the f...
votes
Here is the script to create my tables: CREATE TABLE clients ( client_i INT(11), PRIMARY KEY (client_id) ); CREATE TABLE proje...