Questions tagged as 'sql'

1
answer

Concatenate two sql

I have the records: |DT_OBS | DESC_OBS | COD_TURNO | COD_PERIODO| |01.10.16| TESTE 01| 1 | 1 | |01.10.16| TESTE 02| 2 | 1 | |01.10.16| TESTE 03| 1 | 2 | |02.10.16| TESTE 04| 1 |...
asked by 04.11.2016 / 18:44
2
answers

UPDATE is a DELETE followed by an INSERT?

In another question ( In trigger we have INSERTED, DELETED , but what about "UPDATED"? ) this query has arisen as to how the database is executed due to the way the trigger accesses an altered record. Questions As for a UPDATE (no...
asked by 28.08.2018 / 16:10
2
answers

Show Total Records

Personal Talk, I am developing a system for videoconferences and this should include a Dashboard with some information, such as the total of videoconferences of the current day, the next day and the amount of VIP videoconferences. To show the...
asked by 22.07.2018 / 16:58
2
answers

Mounting database, how do I make this relationship?

I am putting together the EER diagram of an ERP. Virtually all tables have a column named "id_company" that relates to the "companies" table. This is because the user can manage one or more company, and I want every record of the other tables to...
asked by 04.02.2015 / 21:30
2
answers

How do I get the primary key identity of an inserted record?

I need to create a stored procedure to insert a game into my database. A game relates to a league through the campeonatoJogo table. The tables are basically: create table jogo( codJogo int identity primary key, nomeTime1 v...
asked by 21.11.2016 / 02:33
1
answer

How many $ _POST records of a form with dynamic input? [duplicate]

I have a form with dynamic fields but I noticed that when I send it it limits to 166 records. In my form the fields are within a WHILE like this: <input name="contagem[]" type="hidden" value="<?php echo $contagem; ?>" /> <i...
asked by 23.11.2016 / 04:49
2
answers

Limit database results?

Continuing with the lesson videos, I came across a method of displaying data from the database a bit differently, in the video it is used: $result = mysqli_query($conn, 'SELECT * FROM comentarios ORDER BY data DESC'); $row = mysqli_fetch_assoc...
asked by 17.12.2015 / 17:15
1
answer

What is the best way to set up a query?

What is the best way to set up a query in C #? Is it advisable to use concatenation with the + operator? For example: query += " WHERE nome LIKE '%" + nome + "%'"; Here is a% w of% that I set as an example to illustrate the situat...
asked by 18.12.2015 / 00:24
2
answers

Logical ports in SQL

Is there a command that represents the XNOR or NOR logical port in SQL? Something that for example denies the XOR output     
asked by 12.06.2015 / 21:14
3
answers

SQL of tables with multiple relationships

How would the SQL representations of creation and correct insertion of the tables below be so that it is possible to have / store the total number of videos of a genre in such a way that it is possible to take, for example, all the films of use...
asked by 17.04.2015 / 16:02