LMSouq

Knowledge Base

Browse Moodle Solutions

2108 solutions found

Page 34 of 106
0 votes
1 ans
3 views
MySql: Tinyint (2) vs tinyint(1) - what is the difference?

I knew boolean in mysql as `tinyint (1)`. Today I see a table with defined an integer like `tinyint(2)`, and also others like `int(4)`, `int(6)` ... What...

database Solved
RE
asked 1 month ago by realtebo
0 votes
1 ans
3 views
MySQL Cannot drop index needed in a foreign key constraint

I need to ALTER my existing database to add a column. Consequently I also want to update the UNIQUE field to encompass that new column. I'm trying to remove...

database Solved
US
asked 1 month ago by user391986
0 votes
1 ans
3 views
MySQL DISTINCT on a GROUP_CONCAT()

I am doing `SELECT GROUP_CONCAT(categories SEPARATOR ' ') FROM table`. Sample data below: categories ---------- test1 test2 test3...

database Solved
US
asked 1 month ago by user371990
0 votes
1 ans
3 views
Simple way to calculate median with MySQL

What's the simplest (and hopefully not too slow) way to calculate the median with MySQL? I've used `AVG(x)` for finding the mean, but I'm having a h...

database Solved
DA
asked 1 month ago by davr
0 votes
1 ans
3 views
Reshape a Table to Convert Rows to Columns

I tried to search posts, but I only found solutions for SQL Server/Access. I need a solution in MySQL (5.X). I have a table (called history) with 3 columns:...

general-dev Solved
BO
asked 1 month ago by Bob Rivers
0 votes
1 ans
3 views
Foreign key constraints: When to use ON UPDATE and ON DELETE

I'm designing my database schema using MySQL Workbench, which is pretty cool because you can do diagrams and it converts them :P Anyways, I've decide...

database Solved
ME
asked 1 month ago by meltuhamy
0 votes
1 ans
3 views
MySQL Incorrect datetime value: '0000-00-00 00:00:00'

I've recently taken over an old project that was created 10 years ago. It uses MySQL 5.1. Among other things, I need to change the default character...

database Solved
LO
asked 1 month ago by lorm
0 votes
1 ans
3 views
mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists

While starting mysql server 5.7.17 using mysqld_safe, following error occcours. 2017-02-10T17:05:44.870970Z mysqld_safe Logging to '/var/log/mysql/er...

database Solved
RA
asked 1 month ago by Rajadip
0 votes
1 ans
3 views
JOIN queries vs multiple queries

Are JOIN queries faster than several queries? (You run your main query, and then you run many other SELECTs based on the results from your main query) I'...

general-dev Solved
AN
asked 1 month ago by Andreas Bonini
0 votes
1 ans
3 views
Create a new database with MySQL Workbench

Being new to MySQL, I have installed the latest version of the MySQL Workbench (5.2.33). I would like to know how you can create a database with this applicatio...

database Solved
AN
asked 1 month ago by Ant
0 votes
1 ans
3 views
MySQL: Cloning a MySQL database on the same MySql instance

I would like to write a script which copies my current database `sitedb1` to `sitedb2` on the same mysql database instance. I know I can dump the sitedb1 to a s...

database Solved
UC
asked 1 month ago by uclajatt
0 votes
1 ans
3 views
MySQL dump by query

Is it possible to do `mysqldump` by single `SQL query`? I mean to dump the **whole** database, like `phpmyadmin` does when you do export to `SQL`

database Solved
JA
asked 1 month ago by Jakub Arnold
0 votes
1 ans
3 views
Using MySQL with Entity Framework

Can't find anything relevant about Entity Framework/MySQL on Google so I'm hoping someone knows about it.

database Solved
VI
asked 1 month ago by vintana
0 votes
1 ans
3 views
MySQL CONCAT returns NULL if any field contain NULL

I have following data in my table "devices" affiliate_name affiliate_location model ip os_type os_version cs1...

database Solved
NE
asked 1 month ago by Neeraj
0 votes
1 ans
3 views
String concatenation in MySQL

I am using MySQL and MySQL Workbench 5.2 CE. When I try to concatenate 2 columns, `last_name` and `first_name`, it doesn't work : select first_name +...

database Solved
RO
asked 1 month ago by Roshan
0 votes
1 ans
3 views
INSERT ... ON DUPLICATE KEY (do nothing)

I have a table with a unique key for two columns: CREATE TABLE `xpo`.`user_permanent_gift` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT , `fb_u...

general-dev Solved
UF
asked 1 month ago by ufk
0 votes
1 ans
3 views
Quick easy way to migrate SQLite3 to MySQL?

Anyone know a quick easy way to migrate a SQLite3 database to MySQL?

database Solved
ST
asked 1 month ago by Stephen Cox
0 votes
1 ans
3 views
MySQL select one column DISTINCT, with corresponding other columns

ID FirstName LastName 1 John Doe 2 Bugs Bunny 3 John Johnson I want to select `DISTINCT` resul...

database Solved
M
asked 1 month ago by m r
0 votes
1 ans
3 views
How to get the count of each distinct value in a column?

I have an SQL table called "posts" that looks like this: id | category ----------------------- 1 | 3 2 | 1 3 | 4 4...

general-dev Solved
JE
asked 1 month ago by Jeff Gortmaker
0 votes
1 ans
3 views
Setting the MySQL root user password on OS X

I just installed MySQL on Mac OS X. The next step was setting the root user password, so I did this next: 1. Launch the terminal app to access the Unix comma...

database Solved
MA
asked 1 month ago by madaura