When a trigger is triggered after an insert and the insert is within a transaction, does the trigger execute at the time of the insert or at the end of the transaction?
I'm trying to use the following command to insert:
$sql = "INSERT INTO tabela (campo1, campo2, campo2, campo4)
values(:campo1, :campo2, :campo3,'S')";
$campos = array(
':campo1' => $nome,...
I have the following command:
SELECT CAST(450/4 AS DECIMAL(15,2))
Return : 112 where the right one would be 112.5
Why this?
NOTE: My SCRIPT is in a procedure, but roughly my problem is in this select
I need to display the result of this query in columns, each row represents an employee point mark on the day, I'm trying to use the pivot, but I'm not getting it.
I need to make a report and I can not sort it as a wish, I want to select customer debit between 60 and 120 days and sort by total. The code looks like this:
SELECT
SUM(cod_fat_cli) "Total",
nom_cad_cli "Nome",
end_cad_cli "Endereço"
FR...
I have a question about the exact days that SQL includes, and my system once per day performs the following query on the system:
SELECT id,nome FROM products WHERE
created_date between \'"+last_date+"\' and \'" + now+"\'
Where
to...
I need to return the total monthly data according to the parameter of MONTH and YEAR reported.
I did as follows:
WHERE a.dt_mesano_referencia between
to_date('01/'|| :NR_MES ||'/'|| :NR_ANO ||' 00:00:00', 'dd/mm/yyyy hh24:mi:ss') and
last_...
I'm implementing a function for a vendor search field and my sql function is in trouble, would anyone know which problem? This was a function of when I used postgree, but now I'm using mySQL.
package br.com.project.bean.geral;
import java.la...
Hello, I would like to know how to write images (.jpg, .png, .bmp, etc) in the MySQL database using Delphi XE6.
I would like to use TDBImage, if possible, to show the images already recorded in the database. Where it stores the image in MySQL is...