Questions tagged as 'sql'

0
answers

A referential integrity constraint violation has occurred

I'm getting this error every time I try to update an object in my SQL database via EntityFramework , the error is as follows:    A referential integrity constraint violation has occurred: Property values that define referential constraints a...
asked by 04.01.2018 / 11:35
1
answer

How to correctly set the & character in SQL Developer 17.3

Hello friends I'm trying to do a sql query in SQL Developer as follows: SELECT * FROM CLIENTE WHERE NOME_CLIENTE IN ('SALES & CIA AGUIAR', 'SAO JOAO') The tool understands the '&' character as a variable entry and so does not displa...
asked by 21.12.2017 / 12:00
4
answers

What is the difference between INNER JOIN and OUTER JOIN?

What is the difference between INNER JOIN and OUTER JOIN ? Can you give me some examples?     
asked by 19.02.2014 / 03:32
1
answer

is_numeric is it safe to do SELECT?

I'm developing an application with PDO, and I usually use bindValue() to run SELECT 's, but I'm developing an application that gets a variable that contains commas and numbers, which will be exploded later. What I wanted to know...
asked by 18.12.2017 / 15:17
1
answer

Sort by day of the week and time

I want to sort by the day of the week and time The data is coming as follows: id, dia_hora 1 SEG-10h 2 QUI-11h 3 SEX-09h query that works when you only get the acronym without time: SELECT id,dia FROM minhatabela ORDER BY ( FI...
asked by 14.12.2017 / 19:06
1
answer

Create trigger after update in the table itself and in another

First I have a table: create table alecrim( id_alecrim int not null auto_increment, sem_epi int not null unique, p1 smallint, p2 smallint, p3 smallint, p4 smallint, p5 smallint, p6 smallint, p7 smallint, p8 smallint, p9 smallint, totOvos i...
asked by 01.01.2018 / 14:28
1
answer

Identify the change of record in a temporal table?

I'm working on a table that keeps track of some people, and I need to identify and display rows that have undergone some modification in a particular column. See example: --Tabela HistSituacaoPessoa id | nome | situacao | data 999| Fulano...
asked by 19.12.2017 / 18:13
1
answer

PostgreSQL Update

I have a question, a customer informed that there was an error in the registration of his products, and the employees registered the cost price as the price and vice versa. Would I have to run an update from PostgreSQL , changing cost prices...
asked by 20.12.2017 / 05:30
1
answer

Query MySql to display records not linked to a certain company [duplicate]

I need to create a query in SQL . I have three tables: TABELA 1: EMPRESA emp_codigo (chave primaria) emp_nome TABELA 2: PALAVRAS_CHAVE pal_codigo (chave primaria) pal_nome TABELA 3: VINCULO vin_codigo (chave primaria) vin_empresa...
asked by 11.12.2017 / 20:41
0
answers

How to reload a PHP page via Javascript?

I have a page in PHP that writes the dodos of a form via JSON, below the script: Index.php <?php include '../includes/config_db.php'; include '../includes/functions.php'; include 'pdv_lib.php'; class Conta { public $mesaNumer...
asked by 11.12.2017 / 13:59