Most voted "database" questions
A database (its abbreviation is BD, DB, database) is an organized collection of data typically used to model certain situations. Use this tag if you have questions about designing a database. If this is a specific database management system, like Mysql, for example, use this tag instead.
Learn more…3,414 questions
Sort by count of
-
0
votes2
answers1109
viewsInsert error: There are more Columns in the Insert statement than values specified in the values clause
When I give an input searching data from another table, this error is returned, which may be wrong with the query ? INSERT INTO dbo.CRMRAT (IDCRMRAT, CODCOLIGADA, STATUS, TIPO, IDCRMCLIENTE,…
-
0
votes1
answer131
viewsHow to make a bit flags selection filter?
I am a database novice and am participating in an Oracle-SQL project where I need to create a flags selection filter in a column that stores flags as active or not from the position of each binary…
-
0
votes1
answer110
viewsDifficulty creating a mysql query
I have this table: Typotarefa: Id, Descricao 17, Depilação Buço 18, Depilação Pernas 19, Depilação Orelhas 20, Depilação Barba 21, Cortar Unhas Pés 22, Cortar Unhas Mãos 28, Esvaziar Saco Urina 29,…
-
0
votes2
answers86
viewsProblem inserting data into Sqlite and updating Recyclerview
I’m having problems in my Sqlite bank where I created a method in my DatabaseController.java who is called recuperarUltimoDigitado() - this method retrieves the entered value and then updates the…
-
0
votes1
answer78
viewsError fitdist "should not have NA or Nan values"
I have been trying to adjust the distributions and lognormal in the data and have been facing the following error: --should not have NA or Nan values--. Dice:…
-
0
votes1
answer41
viewsDatabase parameter insertion error (with files that have the same code)
Hello to those who are reading the question I would like to help with an Insert problem I am facing with a registration program I found on the internet and when making the first version it did not…
-
0
votes0
answers66
viewsHow to await the return of information using Firebase Realtime Database
I’m having trouble working with asynchronous Firebase Database data I need to identify the type of logged-in user: public Static String getTipoUsuario(){ User = query User(); Return…
-
0
votes0
answers88
viewsPHP error while trying to pull data from Mysql database
Good morning guys, okay? I got a problem on the next one. I hosted my PHP site on a Server where there is the DNS and the main suffix of the network, so that the site can only be accessed internally…
-
0
votes1
answer53
viewsProblem feeding database via php form
Good guys, I’m doing some tests with a database, but I’m having a problem where for some reason, the information is not being sent. The codes are in different files; I have a file called…
-
0
votes1
answer56
viewsRelationship 1:N in the Entity Framework
Good afternoon. I am studying the Entityframework and I am not managing to do something that seems to be simple but will not. ( I wanted to make a 1:N relationship between a table for a customer…
-
0
votes2
answers64
viewsHow to create some kind of "dynamic index" in the database
I have a table with 10000 records, but here I will represent with only 10 of them. +-------+---------+------------------+ | index | posicao | nome | +-------+---------+------------------+ | 1 | 0 |…
-
0
votes1
answer146
viewsPassing values from a Select Multiple to the bank (Codeigniter)
My view is like this: <div class="form-group"> <label for="categorias[]">Selecione a(s) categoria(s) referente(s) a foto:</label> <select name="categorias[]"…
-
0
votes1
answer39
viewssearching text in database
hello, I am developing a Faq system and I use MVC architecture, I created a search structure within my model, and I passed the parameters within the control but when listing inside the view does not…
-
0
votes0
answers98
viewsPhoto gallery by category (Codeigniter)
Here are the codes: VIEW: <div class="container"> <?php echo form_open_multipart('admin/exibe_fotos/index'); ?> <div class="form-group"> <label for="categoria">Selecione a…
-
0
votes1
answer914
viewsHow to rollback the database using Spring Framework
I have this method that saves data in 3 different tables, /** * * @param user - de onde os dados do usuário serão retirados para gravar no banco * @throws GoogleAuthException - se houver algum erro…
-
0
votes1
answer29
viewsProblems to make a SELECT
I’m having a hard time getting a SELECT. I need to list all the information(dcodigo, dnome) of the department (DEPT) that have a manager(position). My code is like this: create database bd_emp; use…
-
0
votes1
answer205
viewsQuery sql to search for and a string equal to but larger than the one stored in the table
I have a table that stores screen urls from my system, I wanted to perform a query that returns me a url that comes parameterized as follows /avaliacoes-cozinha-segura/avalia-cozinha/2 to that url…
-
0
votes2
answers122
viewsIs using the Mariadb JSON type a good one for saving primary keys?
I’m developing a database for a local travel agency: I need to pick up all the passengers and store them in one entity Viagem, so that in the "passengers" field of the latter would be of the JSON…
-
0
votes1
answer1605
viewsERROR: more than one Row returned by a subquery used as an Expression
GOAL I have two tables (tb_get_gap, tb_getCountSRVS), where in the first table count to get the desired values and in the second I have integer values, I just want to take the values of the two and…
-
0
votes1
answer56
viewsQuery SQL does not work correctly
Good Afternoon, I’m trying to pull existing hour intervals on my bench. I’ll post the codes to be more explanatory Query: $user = "Diego"; $pack = "0013-001 B515 MCA ENGINEERING SUPPORT SYSTEM";…
-
0
votes1
answer62
viewsreturn specific content with regex - POSTGRESQL
I have the query below, where are captured the 3 largest memory consuming processes on the machine. I would like my select to display only the pid and the name of the process contained in {name: }…
-
0
votes2
answers104
viewsConvert a Query with a Subquery to a Query with a Join
I’m trying to optimize a Query that the system I’m working on makes it have a SubQuery inside, only this SubQuery is referencing another table that has relation to the main table and by what I’ve…
-
0
votes0
answers1410
viewsError inserting in table: "Missing FROM-clause entry for table..."
I have three tables: CREATE TABLE Bebidas( id SERIAL primary key, nome varchar(40) NOT NULL, preco_bebidas decimal(5,2) check (preco_bebidas > 0.00), qntd int); CREATE TABLE Shots( id SERIAL…
-
0
votes1
answer302
viewsWhat is the SQL Server compatible command for Mysql SHOW CREATE TABLE?
What would be the command in SQL Server to view the script for the creation of a given table? With a result more or less like this: +------------+---------------------------------------------------+…
-
0
votes1
answer102
viewsHow to create a select in the database that runs two tables with a single primary key?
I’m new to programming and I’m developing a note system. The case is as follows: There is a form that registers the notes, where it uses 2 tables of mysql, the notes table (where the code of the…
-
0
votes1
answer174
viewsHow to properly configure db-migrate nodejs? Error in database.json
I’m trying to use db-migrate but I’m getting the answer, when running db-migrate up, the mistake: [ERROR] TypeError: Cannot read property '1' of null at Class.parseName…
-
0
votes1
answer65
viewsI need to make a query in the database. mysql
I have the following database. CREATE TABLE IF NOT EXISTS futebol ( id INT PRIMARY KEY AUTO_INCREMENT, nome VARCHAR(30) NOT NULL, estado VARCHAR(2) NOT NULL, brasileirao INT NOT NULL, copadobrasil…
-
0
votes1
answer51
viewsHow to instantiate a constructor variable (to be Primary key) within the table?
The question is misspelled, but the problem is this. I’m working with BDOR in the Postgresql. I created two Types and I’m adding them to Type animal. Soon after, I used Inheritance and created the…
-
0
votes0
answers46
viewsInsertion with PDO
I’m using the PHP with the objects PDO and Pdostatement, and my code does not portray any errors or Warning, I did the verification of the variables were passing with print_r and is normally, but…
-
0
votes0
answers17
viewsError of Input Characters
Good Night I’m making a registration system with mysql database, but I’m going through difficulties, I’m mounting the crud of displaying data is working perfectly but the insert I’m having trouble…
-
0
votes1
answer239
viewssql result in spring boot
Good afternoon, I need help to make an endpoint in Spring Boot, in the database (Mysql), I have the following query: SELECT U.NOME, P.DESCRICAO FROM USUARIO_PERMISSAO UP JOIN USUARIO U ON…
-
0
votes1
answer98
viewsSQL Error no Postgres
My select: SELECT * ( SELECT v.placa FROM gr_veiculo v WHERE v.id = ( SELECT DISTINCT r.cavalo FROM lg_relacao_veiculo r WHERE ( r.cavalo = (SELECT mv.gr_veiculo_id FROM…
-
0
votes0
answers152
viewsValidate record that has comma in the Oracle PL SQL field
I’m creating a procedure in PL SQL and I have an "unregulated" field that may have more than one comma-separated record. That one procedurecarries out the cancellation of sending extracts of a…
-
0
votes1
answer44
viewsQuery MYSQL does not order correctly
Hello. I have the following query: SELECT * from usuarios_cursos_matriculados LEFT JOIN cursos ON cursos.cedoc_doc_id_fk = usuarios_cursos_matriculados.cedoc_doc_id_fk LEFT JOIN cedoc_doc ON…
-
0
votes0
answers39
viewsHashing a hash increases security?
Well a colleague of mine has been insisting on the idea of hashing a hash, I think they use in the company where he works The hash is in md5. I’ll explain as an employee: When registering a new user…
-
0
votes2
answers413
viewsSQL Server - calculate number of word occurrences in a column, per record
My goal is to create a select to return the total occurrences of a word, a column, per record My table is modeled as follows: id / filename / qntd_pg / content ex: I want to search how many times…
-
0
votes1
answer1200
viewsA server connection was successfully established, but an error occurred during the logon process
Hello guys I’m having a problem trying to make the connection to a database via Microsoft SQL Server Management Studio but it displays the following error message: A server connection was…
-
0
votes1
answer342
viewsRead data from an Excel cell to search via SQL
I need to execute an SQL that brings me a result of only one cell, but, I need to capture information of two. I will enter with start date and end date, my result will be a calculated value in that…
-
0
votes1
answer365
viewsError connecting Flyway in spring application
Configuration of the POM: Application properties: Error while running project: 2019-12-19 11:23:27.844 ERROR 22884 --- [ restartedMain] o.s.boot.Springapplication : Application startup failed…
-
0
votes1
answer80
viewsHow to use two database columns as a sort criteria for a Query?
Hello, Could you help me with this question? I’m making a query in MYSQL you need to search the records database and sort them by two different columns using ORDER BY. I’m using the query following,…
-
0
votes1
answer57
viewsError while UPDATING Image URL in Database
When running the PHP code I get the following error: Parse error: syntax error, Unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or Identifier (T_STRING) or variable (T_VARIABLE) or number…
-
0
votes1
answer689
viewsInsert values from a variable into the database with nodejs, mysql and sequelize
I’m trying to input into the database the contents of the variables: token and now. The respective fields in the table users of the bank are: passwordResetToken and passwordResetExpires. I can…
-
0
votes1
answer44
viewsI cannot show database data with ajax,php and jquery
I need you to click on checkbox, he makes a database query and returns it to me inside a div. But I can pull the data with ajax and show in div directly(home_.php is showing the select I did), but…
-
0
votes1
answer326
viewsPass view parameters to Django form creator
I have the following application where it is supposed to be possible to edit the details of a selected room. In the file that handles the view I query the database of the selected room for editing…
-
0
votes1
answer226
viewsHow to make a single request with ajax and jquery?
I have more than 50 checkbox,when I click on it, it checked the state with jquery step pro ajax bring the data from the page "home.php", but the way it is like this, I have to duplicate the code and…
-
0
votes1
answer28
viewshow to use the SELECT statement to be inserted in a column in the same table?
SELECT Names,SUBSTRING(Names,10,50) AS Alias FROM NameToSplit; Here I do not want to put the Aliases, but INSERT in the column Alias this Select statement. then I need to take this column Alias and…
-
0
votes0
answers65
viewsProblems with Table Modeling with Two Foreign Keys
I need to finish a modeling of a database and I’m at an impasse. Simply put, I have 3 tables as follows: PROMISSORY NOTES CREATE TABLE IF NOT EXISTS `picinin`.`promissorias` ( `id_promissoria` INT…
-
0
votes2
answers142
viewsError with.mysql.jdbc.exceptions.jdbc4.Mysqlintegrityconstraintviolationexception: Cannot add or update a Child Row: a Foreign key Constraint fails
Good people, I have this mistake and I can’t see the solution. I’m working on my first post-college project and I’m in need of some guidance. I have tables: Client, Ordemdeservico, Budget, Service…
-
0
votes0
answers34
viewsField timestamp does not insert in Mariadb
I have a local server to program using shaman and his database is mariaDB. I made a system that inserts a record in the table but the data_separation field is a timestamp that by default is NULL. At…
-
0
votes2
answers33
viewsProblem connecting tables using a foreign key
Good afternoon, I have a little problem making the link between the tables, I need to connect the athlete table and make the link with the document sending organ table. The following error appears…