Tag: sql

58 votes
11 answers
1.8K views
How can I find all the tables in MySQL with specific column names in them?

I have 2-3 different column names that I want to look up in the entire database and list out all tables which

avatar
Yolando
0 1 0 9
asked 07 September, 2021
58 votes
26 answers
1.9K views
How do you set a default value for a MySQL Datetime column?

How do you set a default value for a MySQL Datetime column? In SQL Server it's getdate(). What is the eq

avatar
Jesenia
0 1 0 9
asked 07 September, 2021
54 votes
14 answers
2.1K views
How do I specify unique constraint for multiple columns in MySQL?

I have a table: table votes ( id, user, email, address, primary key(id), ); Now I want

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
58 votes
20 answers
481 views
MySQL error code: 1175 during UPDATE in MySQL Workbench

I'm trying to update the column visited to give it the value 1. I use MySQL workbench, and I'm writi

avatar
Shanita
0 1 0 9
asked 07 September, 2021
51 votes
17 answers
683 views
How to get the sizes of the tables of a MySQL database?

I can run this query to get the sizes of all tables in a MySQL database: show table status from myDatabaseNam

avatar
Dusty
0 1 0 9
asked 07 September, 2021
60 votes
30 answers
1.7K views
How do I quickly rename a MySQL database (change schema name)?

The MySQL manual at MySQL covers this. Usually I just dump the database and reimport it with a new name. This

avatar
Freida
0 1 0 9
asked 07 September, 2021
55 votes
8 answers
2.4K views
What's the difference between utf8_general_ci and utf8_unicode_ci?

Between utf8_general_ci and utf8_unicode_ci, are there any differences in terms of performance?

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
51 votes
26 answers
318 views
How do I connect to a MySQL Database in Python?

How do I connect to a MySQL database using a python program?

avatar
Dorinda
0 1 0 9
asked 07 September, 2021
56 votes
13 answers
784 views
Which MySQL data type to use for storing boolean values

Since MySQL doesn't seem to have any 'boolean' data type, which data type do you 'abuse&ap

avatar
Corey
0 1 0 9
asked 07 September, 2021
50 votes
30 answers
1.4K views
How can I output MySQL query results in CSV format?

Is there an easy way to run a MySQL query from the Linux command line and output the results in CSV format? He

avatar
Joseph
0 1 0 9
asked 07 September, 2021
54 votes
15 answers
1.7K views
How can I get a list of user accounts using the command line in MySQL?

I'm using the MySQL command-line utility and can navigate through a database. Now I need to see a list of

avatar
Patsy
0 1 0 9
asked 07 September, 2021
61 votes
11 answers
519 views
Installing specific package versions with pip

I'm trying to install version 1.2.2 of the MySQL_python adaptor, using a fresh virtualenv created with th

avatar
Leonardo
0 1 0 9
asked 07 September, 2021
52 votes
30 answers
922 views
Should I use the datetime or timestamp data type in MySQL?

Would you recommend using a datetime or a timestamp field, and why (using MySQL)? I'm working with PHP

avatar
Trudy
0 1 0 9
asked 07 September, 2021
67 votes
12 answers
3K views
List of tables, db schema, dump etc using the Python sqlite3 API

For some reason I can't find a way to get the equivalents of sqlite's interactive shell commands: .

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
54 votes
2 answers
1K views
Logically select categories and subcategories (php,joomla,javascript,ajax)

Hello I have installed jbusinessdirectory component for joomla, and I have module named mod_jbusinessdirectory

avatar
Benton
0 1 0 9
asked 07 September, 2021
73 votes
5 answers
2.4K views
Joomla Database - How to use LIMIT in getQuery?

I want to build the below query using joomla inbuilt database class. SELECT * FROM table_name ORDER BY id DE

avatar
Virgil
0 1 0 9
asked 07 September, 2021
53 votes
4 answers
2.3K views
SQL query to prepend prefix to existing value in a field

I have searched and searched for an answer to this, and I think this must be child's play for anyone who

avatar
Emilia
0 1 0 9
asked 07 September, 2021
48 votes
6 answers
2.4K views
What is Drupal's default password encryption method?

I am trying to figure out what is the security that Drupal 6/7 uses by default to store passwords. Is it MD5,

avatar
Rudolf
0 1 0 9
asked 07 September, 2021
54 votes
17 answers
1K views
Entity Framework: There is already an open DataReader associated with this Command

I am using Entity Framework and occasionally i will get this error. EntityCommandExecutionException {"There

avatar
Suzan
0 1 0 9
asked 07 September, 2021
62 votes
23 answers
2.2K views
Entity Framework. Delete all rows in table

How can I quickly remove all rows in the table using Entity Framework? I am currently using: var rows = from o

avatar
Boyd
0 1 0 9
asked 07 September, 2021