378 solutions found in general-dev
Page 8 of 19votes
I have seen many queries with something as follows: SELECT 1 FROM table What does this `1` mean, how will it be executed, and what will it retu...
votes
I have the following sql create statement mysql> CREATE TABLE IF NOT EXISTS `erp`.`je_menus` ( -> `id` INT(11) NOT NULL AUTO_INCREMEN...
votes
I have a query that inserts using a `SELECT` statement: INSERT INTO courses (name, location, gid) SELECT name, location, gid FROM courses...
votes
I can read the *MySQL* documentation and it's pretty clear. But, how does one decide which character set to use? On what data does collation have an effect?...
votes
For the various popular database systems, how do you list all the columns in a table?
votes
I'm going to run `SHA256` on a password + salt, but I don't know how long to make my `VARCHAR` when setting up the MySQL database. What is a good length...
votes
After upgrading MySQL to 5.7.8-rc and loging to server I got error: Table 'performance_schema.session_variables' doesn't exist I can'...
votes
I'm not sure how password hashing works (will be implementing it later), but need to create database schema now. I'm thinking of limiting passwords t...
votes
In MySQL, I have a table, and I want to set the `auto_increment` value to `5` instead of `1`. Is this possible and what query statement does this?
votes
I want to create a new user in MySQL with the syntax: create user 'demo'@'localhost' identified by 'password'; But it returns...
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
I'm using a MySQL database. In which situations should I create a unique key or a primary key?
votes
I'm trying to figure out what collation I should be using for various types of data. 100% of the content I will be storing is user-submitted. My understa...
votes
I am trying to find a MySQL query that will find DISTINCT values in a particular field, count the number of occurrences of that value and then order the results...
votes
So I try to import sql file into rds (1G MEM, 1 CPU). The sql file is like 1.4G mysql -h xxxx.rds.amazonaws.com -u user -ppass --max-allowed-packet=33554432...
votes
I have tables that I've tried setting PK FK relationships on but I want to verify this. How can I show the PK/FK restraints? I saw [this][1] manual page, bu...
votes
I have just installed Debian Lenny with Apache, MySQL, and PHP and I am receiving a PDOException `could not find driver`. This is the specific line of code i...
votes
I am having a problem with BLOB fields in my MySQL database - when uploading files larger than approx 1MB I get an error `Packets larger than max_allowed_packet...
votes
I've got the following two tables (in MySQL): Phone_book +----+------+--------------+ | id | name | phone_number | +----+------+------...
votes
How do I get the current AUTO_INCREMENT value for a table in MySQL?