422 solutions found in database
Page 14 of 22votes
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...
votes
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...
votes
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:...
votes
I'd like to get all of a MySQL table's column names into an array in PHP. Is there a query for this?
votes
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...
votes
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...
votes
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...
votes
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...
votes
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...
votes
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;...
votes
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`....
votes
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.
votes
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...
votes
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:...
votes
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%...
votes
I'm currently developing an application using a MySQL database. The database-structure is still in flux and changes while development progresses (I chang...
votes
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...
votes
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...
votes
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...
votes
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...