Questions tagged as 'sql'

1
answer

SQL login method

I have the following scheme: JdbcRowSet myrs = new JdbcRowSetImpl(); myrs.setUrl("jdbc:postgresql://localhost:9999/teste"); myrs.setUsername("postgres"); myrs.setPassword(""); myrs.setCommand("select count (*) from pessoas where cpf = '12345'...
asked by 13.08.2014 / 04:56
2
answers

When is it recommended to use decreasing indexes?

By default , relational databases create indexes using increasingly ordered binary tree structures. However there is the possibility of creating it in a decreasing way as well. My question is whether (and when) it is recommended to use it. F...
asked by 05.08.2014 / 13:21
1
answer

Problem in MySQL query

I have a problem with a MySQL query. In it I have 3 tables that I need to cross: Drawing table: id concurso_id customer_id Contest table: id titulo criterioDiasCorridos criterioNotaMedia criterioMinimoVotos "notadesenho" table:...
asked by 21.08.2014 / 17:43
1
answer

How to fetch data from a third table based on the associative table

To contextualize: I have a table called principal and another called school. There are schools that are directors that are registered under the name of the school. In the case, these schools are registered in the school table and the associati...
asked by 01.09.2017 / 18:43
1
answer

JAVA Connection with BANK

I am not able to connect java with a database, because an error appears as in the image, Can anyone help me?     
asked by 15.06.2015 / 19:32
1
answer

Query with OPERATOR IN return only records that have all values entered

I'm having a question about how to return records from a table that have all the values entered in the IN operator using JOIN in another table. I have a table of flags, colors and the other making the relation between the two (flags a...
asked by 16.06.2015 / 19:07
2
answers

How to make a user in SQL Server 2008 only view a VIEW?

I made a View to send to a client, but I can not pass the general login and password for it. That way I created a user ( cliente_view ) and I would like it to only view the created View (sales_view_view). How to do this process...
asked by 26.06.2017 / 13:29
1
answer

Importing a txt file in PostgreSQL 9.6

Personal I have the following problem: I have a file in txt format with the following information: 1;Helder;Masculino;GO 2;João;Masculino;RJ 3;Maria;Feminino;PR 4;Pedro;Masculino;MA I used this example to test the import to postgres 9.6, bu...
asked by 04.01.2017 / 13:28
3
answers

Where in an array

I have the following Query: SELECT u.user_nome FROM tb_Usuario u WHERE u.user_ativo = 1 I need one more clause where where it compares a id of the user. However, I get this id through array , how do I make that...
asked by 08.11.2016 / 18:31
1
answer

Doubt with relational modeling

I am setting up a real estate register, where these properties belong to an address, which belongs to a neighborhood that belongs to a city. Ex tables: Imoveis: id, endereco_id, etc... Enderecos: id, nome, bairro_id, rua, numero, cep, etc....
asked by 30.06.2014 / 17:20