Is there any recommendation on which of the two is preferable in terms of performance?
SELECT funcionarios.nome
FROM funcionarios
INNER JOIN empresas
ON empresas.id = funcionarios.empresa_id
WHERE empresas.nome = 'Nome da Empresa'
or
SE...
Hello, I have a table in the database that has several times stored in it. And I'm just making an appointment that is giving error.
Inquiry:
select proximo from (select localizacao.horario as proximo from localizacao where localizacao.horar...
Well I need to update my accounts that are over 5 months old, I wanted to do this right in mysql. The update looks like this:
UPDATE contas
SET baixa_valivade = true
WHERE data_vencimento (Preciso verificar se já esta vencida a mais de 5 meses...
I am a beginner in SQL and am having difficulty using CASE WHEN .
I have a table called CRM_PROCESSO , in which there is a column with the Status option, but the answer for this status is numeric, being 1 - Aberto ,...
I am copying the records from one table to another on different banks, however a column in the new table can not be null and the data coming from the old table is null.
Is there a way to put some conditional so that it "turns" null fields into s...
I need to make a query that brings values of 2 rows into a single Ex:
id | valor | banco
000001 | 1000,00 | caixa
000001 | 1000,00 | bradesco
I need it to look like this:
id | valor | banco 1 | banco 2
000001 | 1000,00...
Hello, people
I have a problem with how to insert two commands (INSERT and UPDATE) into the same SQLite statement via the R language.
I do not know if this is impossible because of SQLite or the DBI package of R.
Here is an example of w...
I have 2 selects below, how can I join in just 1 select?
I need to get everything sold in a certain period (BETWEEN) per item only at the same time I have to get what I had from the item's stock up to the start date.
To separate whether it...
I have a problem in doing a query where I have 3 fields and only one of them is filled up that no longer shows this result.
Can someone help me do this?
select * from tabelas where campo1 and campo2 and campo3