LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

378 solutions found in general-dev

Page 8 of 19
0 votes
1 ans
3 views
What does it mean `SELECT 1 FROM table`?

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...

general-dev Solved
MI
asked 1 month ago by Microsoft Developer
0 votes
1 ans
3 views
Invalid default value for 'create_date' timestamp field

I have the following sql create statement mysql> CREATE TABLE IF NOT EXISTS `erp`.`je_menus` ( -> `id` INT(11) NOT NULL AUTO_INCREMEN...

general-dev Solved
RO
asked 1 month ago by robert
0 votes
1 ans
3 views
INSERT with SELECT

I have a query that inserts using a `SELECT` statement: INSERT INTO courses (name, location, gid) SELECT name, location, gid FROM courses...

general-dev Solved
KY
asked 1 month ago by Kyle
0 votes
1 ans
3 views
What does character set and collation mean exactly?

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?...

general-dev Solved
SA
asked 1 month ago by Sander Versluys
0 votes
1 ans
3 views
How do I list all the columns in a table?

For the various popular database systems, how do you list all the columns in a table?

general-dev Solved
MA
asked 1 month ago by MattGrommes
0 votes
1 ans
3 views
How long is the SHA256 hash?

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...

general-dev Solved
TO
asked 1 month ago by Tony Stark
0 votes
1 ans
3 views
Table 'performance_schema.session_variables' doesn't exist

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&#39...

general-dev Solved
TA
asked 1 month ago by Taz
0 votes
1 ans
3 views
What data type to use for hashed password field and what length?

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...

general-dev Solved
Z-
asked 1 month ago by z-boss
0 votes
1 ans
3 views
Change auto increment starting number?

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?

general-dev Solved
JO
asked 1 month ago by John Jones
0 votes
1 ans
3 views
Your password does not satisfy the current policy requirements

I want to create a new user in MySQL with the syntax: create user 'demo'@'localhost' identified by 'password'; But it returns...

general-dev Solved
NG
asked 1 month ago by Nguyen
0 votes
1 ans
3 views
How to select date from datetime column?

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...

general-dev Solved
MY
asked 1 month ago by mysqllearner
0 votes
1 ans
3 views
Difference between primary key and unique key

I'm using a MySQL database. In which situations should I create a unique key or a primary key?

general-dev Solved
AN
asked 1 month ago by Anuj
0 votes
1 ans
3 views
UTF-8: General? Bin? Unicode?

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...

general-dev Solved
DO
asked 1 month ago by Dolph
0 votes
1 ans
3 views
Count the occurrences of DISTINCT values

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...

general-dev Solved
JI
asked 1 month ago by JimmyJ
0 votes
1 ans
3 views
Access denied; you need (at least one of) the SUPER privilege(s) for this DEFINER operation

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...

general-dev Solved
KE
asked 1 month ago by kenpeter
0 votes
1 ans
3 views
Show constraints on tables command

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...

general-dev Solved
CA
asked 1 month ago by Captain Claptrap
0 votes
1 ans
3 views
PDOException “could not find driver”

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...

general-dev Solved
MI
asked 1 month ago by Mike Moore
0 votes
2 ans
3 views
How to change max_allowed_packet size

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...

general-dev Solved
MU
asked 1 month ago by Muleskinner
0 votes
1 ans
3 views
Find records from one table which don't exist in another

I've got the following two tables (in MySQL): Phone_book +----+------+--------------+ | id | name | phone_number | +----+------+------...

general-dev Solved
PH
asked 1 month ago by Philip Morton
0 votes
1 ans
3 views
Get current AUTO_INCREMENT value for any table

How do I get the current AUTO_INCREMENT value for a table in MySQL?

general-dev Solved
BP
asked 1 month ago by bparise