Note:
Пример SQL
There is a table "Persons":
| P_Id | LastName | FirstName | Address | City |
|---|---|---|---|---|
| 1 | Hansen | Ola | Timoteivn 10 | Sandnes |
| 2 | Svendson | Tove | Borgvn 23 | Sandnes |
| 3 | Pettersen | Kari | Storgt 20 | Stavanger |
| 4 | Nilsen | Johan | Bakken 2 | Stavanger |
| 5 | Tjessem | Jakob |
For this we use this query:
Query Result:
| P_Id | LastName | FirstName | Address | City |
|---|---|---|---|---|
| 1 | Hansen | Ola | Timoteivn 10 | Sandnes |
| 2 | Svendson | Tove | Borgvn 23 | Sandnes |
| 3 | Pettersen | Kari | Storgt 20 | Stavanger |
| 4 | Nilsen | Johan | Bakken 2 | Stavanger |
| 5 | Tjessem | Jakob | Sandnes |
Предупреждение SQL
| P_Id | LastName | FirstName | Address | City |
|---|---|---|---|---|
| 1 | Hansen | Ola | Sandnes | |
| 2 | Svendson | Tove | Sandnes | |
| 3 | Pettersen | Kari | Sandnes | |
| 4 | Nilsen | Johan | Sandnes | |
| 5 | Tjessem | Jakob | Sandnes |






Comments
Persons
SET Address = 'Santa path 67', City = 'Sandnes'
WHERE P_Id = 5; Quote
For example, from your examples to be so
table_name
SET column1 = 'column3 my word', column1 = 'my words column4 another word'
WHERE some_column=some_value
How to?
Thank you very much. Quote
Prescribe please him Constantine. (And still value column3 not numbers but words) Thank you.
I tried using the options for a bunch of words and a column value signs +, (comma) - but fails.
I want one word and its meaning for all rows column3 column1. Quote
But as I said teachers in the same cell may be one condition. Do you want to Azat vphnut there two conditions. But if you get it, please write how it looks. )))
table_name
SET column1 = CONCAT (column3, 'my word')
WHERE some_column=some_value Quote
login not
log1 1111
log2 2222
C using SQL to specify the query:
nameTable SET login = 'log3', not = '11111 'WHERE (that I need to write on, so the value has changed in the second row, with the proviso that we do not know the contents of the table)
Thank you in advance) Quote
Sentence: Quote: - Sounds ill!
In my opinion is better to write like this:
"So we want to update columns Address, and City line LastName = 'Tjessem' and FirstName = 'Jakob'" Quote