clean up table in MySQL which uses auto increment

MySQL
My table looks like this: table_id | letters -------- | ------- 4 | a 10 | b 24 | c 78 | d 110 | e 23...
10 months ago

How can i check name with single quotes in SQL?

MySQL
I have used below code for checking lastname(case sensitive) from DB. SELECT * FROM BL12_anncurtis_existing_customers WHERE BINARY LastName LIKE 'rav...
10 months ago

Compare columns depending on the value of rows

MySQL
I'm newbie to MySQL syntax, please help. Updated query: $query = mysql_query("SELECT campaign, team, employeeName, shiftcode, scheduleDate,STR_TO_...
10 months ago

canvasJS : the chart isnt loaded

MySQL
it's actually my first time to use the canvajs but it doenst really work :( could someone please check my code data.php <?php header('Content-T...
10 months ago

View definitions in MariaDB are not create with mysqldump

MySQL
I have a db in MariaDB 10.1.25 and in this, I have many tables and 20 views. When I try to backup my db using mysqldump, it works fine for tables but ...
10 months ago

SQL query to show only active jobs, not the expired jobs

MySQL
I want to write a query to display jobs that are not yet expired. I also want to show the jobs that are expiring today. SELECT jd.`job_title`,jd.`da...
11 months ago

Numerate SQL collumn values and pick a random one

MySQL
Well, I will not lie, but I have no clue on how can I do it, I am using PHP and SQL, have some values in one SQL table for example: +----+----------+...
11 months ago

Database table design task

MySQL
There is a factory with 15 production lines. Each production line, every day gets its own table and needs to fill in efficiency measurements every h...
11 months ago

How to get the only the 2nd best score in MySqL? not the others

MySQL
i have one server whit minigames, and i have a problem whit my database, i need to get in query of mysql only the 2nd best score name.. can anyone hel...
11 months ago

I dont't understand why im getting syntax error on my code below. Can anyone help me?

MySQL
DELIMITER ## create trigger tra_Price after update on assets_cdn_charge for each row begin declare res int; declare ids int; declare idq int; d...
11 months ago

sql - query multiple rows

MySQL
I have a table with names and a bit column indicating whether the name is delted (1) or not (0). I'm trying to write a query that returns all names th...
11 months ago

Select all table rows with each selected row from another table in MySQL

MySQL
I have two tables, one is "stores" table, and the other one is "products" table. Stores table: ------------- | id | desc | ------------- | 1 | st1 ...
10 months ago

Mysql Xampp #2002 error

MySQL
Unbelievable after everything that I have tried it still doesn't work! I have deleted the ibdata and still they keep coming up! I don't know what to ...
10 months ago

How to fetch categories from mysql into ul?

MySQL
I have a mysql database. There are categories in Db for my articles. I want to fetch these categories and display them as a list (side navigation). I ...
10 months ago

Json export for Phoca Download on Joomla 3

MySQL
I am looking to find out how to create an SQL view for my Phoca Download component categories and subcategories. Usually I create the view easily in ...
10 months ago

How can I initialize a MySQL database with schema in a Docker container?

MySQL
I am trying to create a container with a MySQL database and add a schema to these database. My current Dockerfile is: FROM mysql MAINTAINER (me) &l...
10 months ago

Throw exception when there is no values in selected column (stored procedure)

MySQL
DROP PROCEDURE IF EXISTS raise; CREATE PROCEDURE raise(@uld int) DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN SET @uld = (select ULD_ID from doct...
10 months ago

How to change timezone on RDS mysql

MySQL
I'm unable to change the timezone of RDS mysql instance, I used SET GLOBAL timezone = 'Asia/Calcutta' to change the timezone using command prompt. Thr...
10 months ago

How to SELECT with all index of SUBSTRING_INDEX

MySQL
I have a table like this table foo1 +----+------------------------------+ | Id | Content | +----+------------------------------...
10 months ago

is it possible to update the information_schema table in order to add leading text to column names?

MySQL
I am trying to execute this SQL as root: UPDATE information_schema.COLUMNS SET COLUMN_NAME = CONCAT('emp',COLUMN_NAME) WHERE TABLE_SCHEMA = 'edsdb' ...
10 months ago