LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

422 solutions found in database

Page 14 of 22
0 votes
1 ans
3 views
Connect Java to a MySQL database

How do you connect to a MySQL database in Java? When I try, I get java.sql.SQLException: No suitable driver found for jdbc:mysql://database/table...

database Solved
AB
asked 1 month ago by abson
0 votes
2 ans
4 views
How do I check if a column is empty or null in MySQL?

I have a column in a table which might contain null or empty values. How do I check if a column is empty or null in the rows present in a table? (e.g. nu...

database Solved
PR
asked 1 month ago by priya
0 votes
1 ans
3 views
Get table names using SELECT statement in MySQL

In MySQL, I know I can list the tables in a database with: SHOW TABLES However, I want to insert these table names into another table, for instance:...

database Solved
MI
asked 1 month ago by Mike Chamberlain
0 votes
1 ans
3 views
MySQL query to get column names?

I'd like to get all of a MySQL table's column names into an array in PHP. Is there a query for this?

database Solved
HA
asked 1 month ago by Haroldo
0 votes
1 ans
3 views
Best data type to store money values in MySQL

I want to store many records in a MySQL database. All of them contains money values. But I don't know how many digits will be inserted for each one. Whic...

database Solved
MO
asked 1 month ago by Mohammad Saberi
0 votes
1 ans
3 views
MySQL JOIN ON vs USING?

In a MySQL `JOIN`, what is the difference between `ON` and `USING()`? As far as I can tell, `USING()` is just more convenient syntax, whereas `ON` allows a litt...

database Solved
NA
asked 1 month ago by Nathanael
0 votes
1 ans
3 views
What column type/length should I use for storing a Bcrypt hashed password in a Database?

I want to store a hashed password (using BCrypt) in a database. What would be a good type for this, and which would be the correct length? Are passwords hashed...

database Solved
HE
asked 1 month ago by helpermethod
0 votes
1 ans
3 views
Change MySQL default character set to UTF-8 in my.cnf?

Currently we are using the following commands in PHP to set the character set to [UTF-8][1] in our application. Since this is a bit of overhead, we'd li...

database Solved
JO
asked 1 month ago by Jorre
0 votes
2 ans
4 views
How to use multiple databases in Laravel

I want to combine multiple databases in my system. Most of the time the database is MySQL; but it may differ in future i.e. Admin can generate such a reports w...

database Solved
CH
asked 1 month ago by Chintan7027
0 votes
1 ans
3 views
How to rename a table in MySQL?

Renaming a table is not working in MySQL: ```sql RENAME TABLE group TO member; ``` The error message is: ``` #1064 - You have an error in your SQL syntax;...

database Solved
AN
asked 1 month ago by Anil Olakkal
0 votes
2 ans
4 views
Best practices for SQL varchar column length

Every time is set up a new SQL table or add a new `varchar` column to an existing table, I am wondering one thing: what is the best value for the `length`....

database Solved
ES
asked 1 month ago by esskar
0 votes
1 ans
3 views
Log all queries in mysql

Is it possible for me to turn on audit logging on my mysql database? I basically want to monitor all queries for an hour, and dump the log to a file.

database Solved
PU
asked 1 month ago by public static
0 votes
1 ans
3 views
Can table columns with a Foreign Key be NULL?

I have a table which has several ID columns to other tables. I want a foreign key to force integrity **only** if I put data in there. If I do an update at a...

database Solved
BE
asked 1 month ago by bender
0 votes
1 ans
3 views
How do you get the rows that contain the max value for each grouped set in MySQL

I've seen some overly-complicated variations on this question, and none with a good answer. I've tried to put together the simplest possible example:...

database Solved
YA
asked 1 month ago by Yarin
0 votes
1 ans
3 views
Search text in fields in every table of a MySQL database

I want to search in all fields from all tables of a MySQL database a given string, possibly using syntax as: SELECT * FROM * WHERE * LIKE '%stuff%&#3...

database Solved
RS
asked 1 month ago by RSilva
0 votes
1 ans
3 views
Compare two MySQL databases

I'm currently developing an application using a MySQL database. The database-structure is still in flux and changes while development progresses (I chang...

database Solved
VI
asked 1 month ago by Vincent Ramdhanie
0 votes
1 ans
3 views
Database sharding vs partitioning

I have been reading about scalable architectures recently. In that context, two words that keep on showing up with regards to databases are *sharding* and *part...

database Solved
AM
asked 1 month ago by Amit Sharma
0 votes
1 ans
3 views
How to get the max of two values in MySQL?

I tried but failed: mysql> select max(1,0); <pre> ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that correspo...

database Solved
MA
asked 1 month ago by Mask
0 votes
1 ans
3 views
Rename a column in MySQL

I am trying to rename a column in `MySQL` community server `5.5.27` using this SQL expression: ALTER TABLE table_name RENAME COLUMN old_col_name TO new_c...

database Solved
MI
asked 1 month ago by Michael Okoli
0 votes
1 ans
3 views
Error related to only_full_group_by when executing a query in MySql

I have upgraded my system and have installed MySql 5.7.9 with php for a web application I am working on. I have a query that is dynamically created, and when ru...

database Solved
DA
asked 1 month ago by Dan Bemowski