Questions tagged [mysql]

MySQL is a free, open source Relational Database Management System (RDBMS) that uses Structured Query Language (SQL). DO NOT USE this tag for other DBs such as SQL Server, SQLite etc. Those are different DBs which all use their own dialects of SQL to manage the data.

649,275 questions
-1votes
0answers
5views

difference between two tables result update the first

Hi i have 2 table i want compare the Table1 with Table2 and difference insert in table1,how is possible to do that?? in Mysql DB i thinked at this UPDATE Table2 INNER JOIN Table1 ON Table2.orderId = ...
0votes
0answers
4views

mysql inserting data using user input in python

i have tried to take input from user using tkinter entry field and inserting into table....but the table name is also taken as user input and check through the data base if the table exits in and then ...
0votes
1answer
20views

SQL query average over 100 days at a gap of 7 days

So, for this query I need to use 2 columns which are date and value. I need to query the average of value over 100 days at a gap of 7 days, in layman terms I want the average value for all 7 days in a ...
0votes
0answers
15views

How to compile C++ with CMake and -L/usr/include/mariadb/mysql -lmariadbclient

My C++ file includes the mariadb/mysql.h as following. #include <mariadb/mysql.h> I compile my C++ file as following. g++ -std=c++2a -g main.cpp -o main -lmariadbclient It works fine. But if I ...
-1votes
0answers
19views

Getting top 50 rows from two columns SQL query

I want to write a query for getting top 50 customerIds based on in last 30 days how many times they ordered item (numOfOrders column name) and if they are equal then who visited more to our store in ...
0votes
0answers
14views

Component responsible to display all my transactions are not updating after submit

I'm using redux toolkit with react and have a basic setup because I'm building a simple expense tracker, so I have two operations: get all transactions and add a new transaction. That's it. My problem:...
0votes
0answers
29views

How to get a list from a list of lists in JPA?

I'm trying to get a list of my tv_shows based on Actor Id. At this moment, this is the only thing I get working (The list of chapters based on Actor Id) I have tried to do the same with TvShows, but I'...
0votes
1answer
27views

Get items that are closed within 1 business day

I have a MYSQL database table of tickets that I need to count where the ticket has been closed within 1 business day of it being opened. I've been able to get some of the way with my query below, but ...
0votes
0answers
16views

how to fetch birthdays from database without considering year in laravel sql?

if (!empty(request()->from_date) and !empty(request()->to_date)) { $usersObject = \DB::table('user') ->select('user.id','user.fullname','user.email','user....
0votes
0answers
9views

MySQL swapping columns while locking table: is my method theoretically deadlock-free?

I have a friend-relation table as follows: CREATE TABLE `FriendRelation` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id1` bigint(20) unsigned NOT NULL, `user_id2` bigint(20) ...
0votes
0answers
17views

Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (the record exists in the other table) [duplicate]

First of all, I have checked the answers from this link and none have helped me. I have checked everything you say and it is correct. Integrity constraint violation: 1452 Cannot add or update a child ...
0votes
0answers
20views

MySQL Update multiple rows at the same time

I want to create a MYSQL EVENT that updates the customers__card.value on every day ad midnight where the subpay__pool.date > NOW() - INTERVAL 30 DAY, but I got an error that says Subquery returns ...
0votes
0answers
17views

Trying to extract data from MYSQL in excel sheet and getting runtime error 2147467259 (80004005) [duplicate]

I'm learning to extract data from MYSQL to excel, as an attempt using the below code to extract data from a MYSQL table, i'm getting runtime error 2147467259 (80004005).. Sub connect() Dim Password As ...
-1votes
0answers
24views

Improve tables that sometimes contain same data

I have some tables with "reach" data. Some of the columns are: subst: restricted: How would it be better to link them? EC-Number has always one number, CAS sometimes has two numbers (being ...
-1votes
0answers
8views

i have an xml file online, i used python to download and i want to add it to mysql database but the download is wrong and cant import to mysql [closed]

python code to download the xml file this is the code I tried and the format comes differently from the one I have online. I am new to all this and I am trying my best to understand. please do assist

153050per page