The number of affected rows is 0

Updated on technology 2024-03-30
23 answers
  1. Anonymous users2024-02-07

    update menu set parent=null where name like 'a%'

    That is, if the name of the field in your table does not have a value including a, the number of affected rows is of course 0.

  2. Anonymous users2024-02-06

    The error is posted, and the type of database management tool is posted.

  3. Anonymous users2024-02-05

    or""rs="")

    or sql, conn, 1, 1

    rs("The name of the field") = field value.

    set rs=nothing""

  4. Anonymous users2024-02-04

    update

    menuset

    parent=null

    wherename

    likea%'

    It's the word Qing Pei Na in your table name has no value including A's Yu Min only data, and the number of affected rows is of course 0.

  5. Anonymous users2024-02-03

    @@rowcount

    Returns the number of rows that were affected by the previous statement.

    Grammar @@rowcount

    Return type. integer

    Comment: Any statement that does not return a row sets this variable to 0, such as an if statement.

    Example: The following example executes an update statement and uses @@rowcount to detect if there are changed rows.

    update authors set au_lname = 'jones'

    where au_id = '999-888-7777'

    if @@rowcount = 0

    print 'warning: no rows were updated'

  6. Anonymous users2024-02-02

    SQL update has no return value, before the update according to the where condition of the update is queried and saved, and then output after the update.

  7. Anonymous users2024-02-01

    If you specify a primary key, 0 rows are affected, which can be analyzed in the following cases:

    1. No data was found that needed to be updated.

    2. The data to be updated and the updated value are exactly the same.

    3. There is a problem with the SQL statement written by itself.

  8. Anonymous users2024-01-31

    select * from xs where name like'%Locke%'or Name like'%Camel %'

    Query first to see if the data exists.

    It's not a matter of spaces.

  9. Anonymous users2024-01-30

    The command has been executed, but the changes have not yet been committed.

    Run the commint command to commit the changes.

  10. Anonymous users2024-01-29

    I see that the data in your table has a red exclamation mark in front of it, which means that the data has changed.

    What is actually stored may not be the data you see.

    You turn it off and turn it back on, or press F5 to refresh it.

  11. Anonymous users2024-01-28

    If you look at the database table in the camel, there's a space or any other symbol in this data.

  12. Anonymous users2024-01-27

    You start with select * from xs where name='Luo Ting'Determine if there is such a record.

    Check if there are any spaces before and after the name.

  13. Anonymous users2024-01-26

    You need to make sure you have such a record. Update again.

    It should look like this: update xs set name='Luo Ting where name='Camels'

  14. Anonymous users2024-01-25

    There is no information in the table that matches the WHERE condition.

  15. Anonymous users2024-01-24

    The statement is fine, I don't understand what you said about "0 rows are affected, but the records in the table are not updated", 0 rows are affected, and of course the records are not updated. Is there something wrong?

  16. Anonymous users2024-01-23

    This means that you don't have a name = in your table'Luo Ting'This person. You'll have to take a closer look.

  17. Anonymous users2024-01-22

    This shouldn't be the case normally, see if there's a trigger.

    Or if the application received it, it was fault-tolerant, but the error was not indicated.

  18. Anonymous users2024-01-21

    That's what you're talking about.

    rowcount

    Returns the number of rows that were affected by the previous statement.

    Grammar @@rowcount

    Return type. integer

    Comment: Any statement that does not return a row sets this variable to 0, such as an if statement.

    Example: The following example executes an update statement and uses @@rowcount to detect if there are changed rows.

    update authors set au_lname = 'jones'

    where au_id = '999-888-7777'

    select @@rowcount is the row that is affected by the update.

  19. Anonymous users2024-01-20

    Can you provide a statement in which this is the case, and the version of the database? This makes it easier for you to analyze.

  20. Anonymous users2024-01-19

    Is there a trigger that exists, or it won't appear that you are in this situation after you:

    select *

    from tb

    where id='002'It's 11 lines.

  21. Anonymous users2024-01-18

    Wang Yongping said: This is a miracle.

  22. Anonymous users2024-01-17

    You should post the original statement, otherwise you don't know what you're talking about, and it may be that there are related fields in the table.

  23. Anonymous users2024-01-16

    It adds up to 79, probably because you have an index or duplicate column in the table.

Related questions
5 answers2024-03-30

Since you don't know the primary key in your t hy cus install table, it's safer to use exists. >>>More

18 answers2024-03-30

Share common computer tips, computer knowledge, computer skills, computer common problem solutions, etc., what we are sharing today is, 4 steps to solve windows update can not be updated or update error, thank you fans for your continued support.

5 answers2024-03-30

With a view or an index.

create index >>>More

5 answers2024-03-30

The foreground interacts with the data stored internally. >>>More

15 answers2024-03-30

1.It's interesting to understand, but the reality should be: if there are more than two fields after order by, then all the records in the result set are sorted by the previous field, and the same part of the previous field is sorted by the next field. For example: >>>More