Questions tagged as 'sql-insert'

2
answers

What does bank return INSERT 0 1 mean?

When I execute commands in the bank I have returns to and execution of the same ones. Doubt What does 0 mean INSERT 0 1 ? Example CREATE TABLE test( id SERIAL, name VARCHAR(50), PRIMARY KEY (id) ); input:...
asked by 28.06.2017 / 15:53
3
answers

Inserting registry and retrieving ID generated by SQL Server 2012

I want to insert a record into a table, retrieve the ID that was generated by AUTO_INCREMENT and insert records into other tables, using that ID. But, I want to do this all using BeginTransaction . How could I do this? I'm doi...
asked by 23.11.2015 / 12:49
2
answers

What is the difference between an empty string and NULL in SQL?

What's the difference if you store a string as NULL or empty in SQL? How can these two behave when I make a SELECT , or INSERT with value '' in that column that is of type varchar ? If I leave the de...
asked by 13.01.2017 / 15:58
1
answer

xamarin forms await is not respected

Good evening, Can someone tell me why the code below does not respect Wait, in debug the output order is 1. init save 2. End Save 3. New header ID: 1 instead of: 1. init save 2. New header ID: 1 3. End Save public asy...
asked by 11.10.2016 / 20:48
2
answers

How to refresh page and not send duplicate data to the bank in PHP?

I would like to know if someone has an example or can explain me in the following question: In case the user refreshes the page, after submitting the first form, the data is not sent back to MySQL. My application is in PHP, I already resea...
asked by 03.03.2015 / 02:23
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 to insert data into two tables at the same time?

I need to do an insert as follows: I have two tables TABELA 1 and TABELA 2 and a form of cadatro. This form has three inputs: input 1, input 2, input 3 input 1 must be entered in TABELA 1 . input 2 e in...
asked by 12.03.2015 / 16:15
1
answer

How to insert records through cursor?

I need to insert unique records by a field that has the unique identifier, with this I am using cursor; however, the unique identifier will not add according to the inserts. ERROR: You are duplicating and inserting only the first record....
asked by 28.12.2018 / 12:11
1
answer

Error DataBase Locked Sqlite / Java

I have the following problem: in an insert that I am trying to perform, I do not know if it is an error in the database or something in the programming in java, however every time I try to perform an insert of the client table I get the error: p...
asked by 24.12.2016 / 18:24
3
answers

How to do that, if the registry exists, it does update, if it does not make an insert of the same one

I'm a beginner in the forum and in php and I have a question. I have a table with id auto_increment and name is primary key. It has like me to do IF and ELSE using UPDATE and INSERT. Where, if there is name just do update, otherwise do insert?...
asked by 21.09.2017 / 20:16