What am I missing? I want the highest and the lowest value of a table, why can't I save that value in PHP? I just can't access the values. And I tri ...
What am I missing? I want the highest and the lowest value of a table, why can't I save that value in PHP? I just can't access the values. And I tri ...
Looking for a way to return a variable that can be used inside a IN-operator. My current result returns: 1,2,3, but I guess the variable should be mor ...
the error that I'm getting is " Must declare the scalar variable "@x"." I'm trying to declare a variable @x and make him a NVARCHAR(50) then id like ...
I tried to write something like the following, but the result is not the same: select id, request_id, @skill_id :=skill_id as skill_id, @row_number ...
For STRICT_ALL_TABLES, MySQL returns an error and ignores the rest of the rows. However, because the earlier rows have been inserted or updated, th ...
The goal is to variate price over a large range of numbers to be able to plot a figure. My current query returns one row with name and a default price ...
I set a variable name for a table as lowercase: however when i try to call it: I get an error: Why is it calling the uppercase version of my ...
I'm trying to get the number of rows in a table or column and place that value inside an equation, like this: Unfortunately, I get an error 1111 "I ...
I have a statement, The Result, Now as I have to use the customer_id to find other values from the database too. I want to store it in some vari ...
Trying to do something very simple. Using If/Then, is there a way to run a separate Select statement based on the value of a variable? The function Ge ...
nid and vid are both positive integers and status is either 0 or 1. I am at a complete loss at how can last_status result in a NULL -- but it sure ...
Consider the following procedure: Once call-ed, it outputs: But what if getFoo is invoked within a different stored procedure, how do I catch it ...
I've tried to set this by using SET VARIABLE but it said that have_query_cache is read-only ...
I have a MySQL database in production and I am trying to calculate the optimised number to set the MySQL max_connections value to - Am I doing this co ...
So what I expect is for the first piece of code to find the table name then if that table name exists and is more than 3 days old drop that table. My ...
I use the SQL 'show variables like 'character%';' to show the character set in MySQL variables.I find a variable named 'character_set_database', I wan ...
I have created MySQL query interpolation below in Workbench. The query was so fit to my needs except that I could not effect the "User Defined Variabl ...
I am trying to design a unit test that ensures that a message is bigger than a certain number of characters. My code is: I am getting the following ...
i have a table with order_buyer_id as the id of transaction, createdby as the id of the buyer, createdAt as the date which transaction happen, and qua ...
I have been trying to write a stored procedure that involves a user entering in the column they wish to store data in and then the data to be stored. ...