Posts by G. Peres • 41 points
5 posts
-
0
votes1
answer109
viewsA: Delete repeats and return last Postgresql record
You can split your query into two and with a part ,(obraid and data_motion) make a group by by obraid and making the date max, functioning as a table in the FROM clause: SELECT s.descricao,…
-
0
votes1
answer45
viewsA: Doubt Mysql - Query result
You can try the following change in your SELECT--> Instead of using this JOIN clause: `join fornecedor on fornecedor.codComprFornecedor = comprador.codCompr` Use as a LEFT JOIN to return buyers…
-
1
votes1
answer75
viewsA: I need an SQL command to take all records that are equal in one field and different in another
There are two ways to solve your situation: If you need all attributes (zip code, city and ip) to be different: SELECT * FROM tabela_login tab1 INNER JOIN tabela_login tab2 on (tab1.email =…
-
0
votes1
answer49
viewsA: Revoke Mysql ALTER TABLE command specific privileges 5.6.44
Try the following REVOKE command to disable the privilege: REVOKE ALTER FROM *object* FROM *user*;
-
0
votes2
answers722
viewsA: How index selectivity works
The indexes serve to facilitate when selecting the data that will be returned by the query. For composite indexes, that is, those that present more than one column in their structure, the order of…