Category "mysql"

Query to order by the last three characters of a column

Query the name of any student in STUDENTS who scored higher than 75 marks. Order your output by the last three characters of each name. If two or more students

Joomla install error INSTL_ERROR_INITIALISE_SCHEMA

I'm trying to install Joomla 2.5.14 and getting Installation notice INSTL_ERROR_INITIALISE_SCHEMA. Do anyone know the reason for this? Does it required CREATE R

Query with MySQL event

I try to perform this query with Zend DB: $this->db->query(" CREATE EVENT turn_tonormal ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVA

Match csv filenames to table names and import

I have multiple csv files generated everyday with same name and they should be imported to Mysql database . I can import a single file to table where I have def

Return to default value after field equals zero

So I need help in trying to make a database field where it's default 7 and each day minuses 1 until its 0 then the day count starts again from 7. Is it possible

AWS rds - How to read from a read replica inside of a Java application?

I am new to aws. I have a mysql rds instance and I just created 2 read replicas. My application is written in Java, and what I have done up until now is using

Retrieve row where sum of column is greater than other column of different table

I have two database tables. First table: | ID | Sub-Name | Marks | 01 | french | 50 | 01 | russian | 50 | 02 | french | 30 | 02 | russian

sequelize does not creating a table shows this result : "Executing (default): SELECT 1+1 AS result"

I try to create a table using sequelize it goes fine with no error but instead of creating a table is show this message as a result Executing (default): SELECT

JPA created too many fields in table

enter image description here I am trying to map some entities to tables in MySQL database using Spring Boot JPA. I have a problem with one of the tables because

MySQL: json extract remove quotes

I'm using MySQL 5.7.12 and this is my query. select objectid, (JSON_EXTRACT(fullobject, '$.mail')) as mail from openidm.managedobjects where objecttypes_id=5 a

sequelize does not creating a table shows this result : "Executing (default): SELECT 1+1 AS result"

I try to create a table using sequelize it goes fine with no error but instead of creating a table is show this message as a result Executing (default): SELECT

set a column to copy a column from another table (on condition)

What I currently have is: UPDATE card, records IF(records.date_returned == null) THEN SET card.last_seen = records.date_loaned ELSE SET card.last_seen = records

Mysqli Output to a table

So my goal is to output some mysql info to a table. I want it to start a new column every 18th record. Here is my current code: $hostname = "localhost"; //SET

Query to get top 5 users by total month sales amount

I was hoping you could help me figure this out. I would like to run a query that would search a table and all it's rows and the date matches the current month.

Mysql PREPARE statement is taking much times at the time of record insertion

I am using PREPARE statement in store procedure but it is taking much time at the time of records insertion. Please suggest me the replacement for PREPARE state

How to use like in MySQL query in Grafana?

I am working in grafana with MySQL. I have a template variable and it has multiple values and I want to use that template variable with MySQL query using 'like'

MySQL : retrieve a large select by chunks

I have select with more then 70 milion rows I'd like to save the selected data into the one large csv file on win2012 R2 Q: How to retrieve the data from MySQ

How to organize variable IDs that depend on each other in MySQL

I'm creating a database for all the Magic the Gathering cards... The card table looks like this: cardID name text rarityID colorID editionID other colu

How to get value of an Output Parameter of a MySQL SP with TUniSQL

I have created a Stored Procedure in a MySQL DataBase that have 2 output parameters like this (for Example) : CREATE PROCEDURE `invite_user`(fUName VARCHAR(15)

Using SQL to join tables with a junction table

I am trying to output data from 2 different tables in my database which are joined by a junction table. Table 1: musician Columns: musicianID, surname, fName