Questions tagged as 'sql-update'

2
answers

Is it possible to do an INSERT and an UPDATE in the same query in java?

I would like to know if it is possible to make a INSERT and a UPDATE in the same query, that is, in the same operation. I'm using the following to do both. public Connection conn = null; ... conn = DriverManager.getConnection...
asked by 13.01.2017 / 01:16
1
answer

Update table field just checked with checkbox php mysql

@Leo Caracciolo worked out the way you did # , but I have another problem: there are students who are enrolled in several courses, ie the student id is the same but the course id in the run_id column is different for each user id, so each time I...
asked by 08.11.2017 / 00:06
1
answer

column does not obey the where statement of an update

I have a problem. At the moment I do an update, when I use the where only the line with the informed code is updated. but the description field that I inform, its contents is replicated for all the lines of the bank this is the only column that...
asked by 09.06.2016 / 16:29
1
answer

I need to change only half of the records in a MySQL table

I made this procedure in MySQL to change a record only half of the table but it produces an inexplicable error: It seems that trouble is in%% with% refusing to accept a variable. In SQLServer I used LIMIT to solve the problem, but...
asked by 07.01.2015 / 03:59
2
answers

How to update only one column of the record?

I made a code to update some columns of my record when I need it. There are 7 columns listed in array , but generally I only update 1 or 2 columns. With this code I can update my registry, but I have to put data in all inputs , in ca...
asked by 21.11.2018 / 20:23
1
answer

Update on two SQL Server tables [duplicate]

How do I perform an update at the same time on two different tables? I have a table named Tarefa and another called VinculoReferencia , both have the field Taridinclusao where is this field that needs to be updated at th...
asked by 02.10.2017 / 22:56
1
answer

Update to remove a piece of a varchar field

I have a column with a varchar field. In this column it has a value like this: http://dominio/img//12.jpg I want to make an update that leaves this field like this: http://dominio/img/12.jpg This // I want to remove always starts at a...
asked by 19.05.2015 / 15:00
1
answer

Update only the records marked with a checkbox at once php

I have a select that brings a series of records. Here, in these records I need to apply an up and that in my head, the best way would be to use a checkbox field, so that when the user marks the checkbox and then clicks the "submit" button, only...
asked by 07.11.2017 / 00:58
1
answer

"Linked Server" with MySQL

DBMS: SQL SERVER 2014 + MySQL 5.5 What are the SELECT, INSERT, and UPDATE syntax instead of using the "OPENQUERY" function, when connecting through the SQL Server Linked Server, connecting to MySQL?     
asked by 06.06.2014 / 14:17
2
answers

Update in three tables [closed]

Good morning, I wonder if it's possible to update three tables at once? I have the tables booksA, booksB, booksC that are related by column book_id, and I would like to change the value of book_mode column in the three tables at the same time to...
asked by 03.12.2018 / 13:49