sqlt-sqlsql-server-2016-express

sql server 2016 basic select issue


I have basic database table with some rows. see the queries below. first query selects a record from the database.. you see the result. that result is not the same as the other two result. yet I am retrieving the same record from the table using the different columns/methods. correct record is the second and 3rd select queries.

PWTransferID is the primary key. PWtransfernumber is non clustered index/Unique

I am really confused and have never seen a problem like this. can anybody shed some light on this for me. almost like the database is broken some where.

enter image description here


Solution

  • Is that just a typo in the first query? Should 227 be 277?