LMSouq

Knowledge Base

Browse Moodle Solutions

2108 solutions found

Page 40 of 106
0 votes
1 ans
3 views
How to change collation of database, table, column?

The database is `latin1_general_ci` now and I want to change collation to `utf8mb4_general_ci`. Is there any setting in PhpMyAdmin to change collation of dat...

database Solved
US
asked 1 month ago by user158469
0 votes
1 ans
3 views
MySQL order by before group by

There are plenty of similar questions to be found on here but I don't think that any answer the question adequately. I'll continue from the current m...

database Solved
RO
asked 1 month ago by Rob Forrest
0 votes
1 ans
3 views
How to subtract 30 days from the current datetime in mysql?

How do I subtract 30 days from the current datetime in mysql? SELECT * FROM table WHERE exec_datetime BETWEEN DATEDIFF(NOW() - 30 days) AND NOW();

database Solved
US
asked 1 month ago by user784637
0 votes
1 ans
3 views
Adding a new SQL column with a default value

I am looking for the syntax to add a column to a MySQL database with a default value of 0 [Reference][1] [1]: http://dev.mysql.com/doc/refman/5.1/en/...

database Solved
MA
asked 1 month ago by Matt
0 votes
1 ans
3 views
How to find all tables that have foreign keys that reference particular table.column and have values for those foreign keys?

I have a table whose primary key is referenced in several other tables as a foreign key. For example: CREATE TABLE `X` ( `X_id` int NOT NULL...

database Solved
NE
asked 1 month ago by nebs
0 votes
1 ans
3 views
Difference between Key, Primary Key, Unique Key and Index in MySQL

When should I use `KEY`, `PRIMARY KEY`, `UNIQUE KEY` and `INDEX`?

database Solved
HE
asked 1 month ago by HELP
0 votes
1 ans
3 views
MySQL Data - Best way to implement paging?

My iPhone application connects to my PHP web service to retrieve data from a MySQL database, a request can return up to 500 results. What is the best way to...

database Solved
AR
asked 1 month ago by aryaxt
0 votes
1 ans
3 views
How to grant all privileges to root user in MySQL 8.0

Tried mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'root' WITH GRANT OPTION; Getting > ERROR 1064 (4200...

database Solved
PR
asked 1 month ago by Praveen
0 votes
1 ans
3 views
Solving a "communications link failure" with JDBC and MySQL

I'm trying to connect to the local MySQL server but I keep getting an error. Here is the code. public class Connect { public static voi...

database Solved
AN
asked 1 month ago by Anthony
0 votes
1 ans
3 views
Troubleshooting "Illegal mix of collations" error in mysql

Am getting the below error when trying to do a select through a stored procedure in MySQL. > Illegal mix of collations (latin1_general_cs,IMPLICIT) and (l...

database Solved
US
asked 1 month ago by user355562
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
2 ans
3 views
How do I convert from BLOB to TEXT in MySQL?

I have a whole lot of records where text has been stored in a blob in MySQL. For ease of handling I'd like to change the format in the database to TEXT... A...

database Solved
GW
asked 1 month ago by Gwilym
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
How do I enlarge an EER Diagram in MySQL Workbench?

I am working on a moderately complex schema in MySQL Workbench, and the single page of the EER diagram is now full up. Does anyone know how to enlarge it to two...

database Solved
BR
asked 1 month ago by Brian Hooper
0 votes
1 ans
3 views
MySQL: is a SELECT statement case sensitive?

Is a MySQL `SELECT` query case sensitive or case insensitive by default? And if not, what query would I have to send so that I can do something like the followi...

database Solved
RO
asked 1 month ago by rollingcodes
0 votes
1 ans
3 views
Find rows that have the same value on a column in MySQL

In a [member] table, some rows have the same value for the `email` column. login_id | email ---------|--------------------- john | john123@...

database Solved
BO
asked 1 month ago by bobo
0 votes
1 ans
3 views
How does MySQL process ORDER BY and LIMIT in a query?

I have a query that looks like this: `SELECT article FROM table1 ORDER BY publish_date LIMIT 20` How does ORDER BY work? Will it order all records, then g...

database Solved
AL
asked 1 month ago by Alex
0 votes
1 ans
3 views
Convert Unix timestamp into human readable date using MySQL

Is there a MySQL function which can be used to convert a Unix timestamp into a human readable date? I have one field where I save Unix times and now I want to a...

database Solved
KI
asked 1 month ago by King Julien
0 votes
1 ans
3 views
What's the difference between MyISAM and InnoDB?

I understand that this question has been asked before, but most of the time it is asked in relation to a specific database or table. I cannot find an answer on...

database Solved
SC
asked 1 month ago by Scott
0 votes
1 ans
3 views
MySQL INSERT INTO table VALUES.. vs INSERT INTO table SET

What is main difference between `INSERT INTO table VALUES ..` and `INSERT INTO table SET`? Example: INSERT INTO table (a, b, c) VALUES (1,2,3)...

database Solved
IR
asked 1 month ago by Irmantas