07-03-2013, 03:53 PM
Nope the query is correct. Or you want this to apply for only 2 items, because what I posed is only valid for range of items with the a_index between 10019 and 1512( if there are 100 items between these range, this will apply on all the items)
For only 2 items just make(there are 2 methods)
UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index in (10019, 1512);
Or this:
UPDATE t_item
SET a_rare_prob_0 = 6, a_rare_prob_1 = 6, a_rare_prob_2 = 6, a_rare_prob_3 = 6, a_rare_prob_4 = 6, a_rare_prob_5 = 6,
a_rare_index_0 = 14, a_rare_index_1 = 14, a_rare_index_2 = 14, a_rare_index_3 = 14, a_rare_index_4 = 14, a_rare_index_5 = 14
WHERE a_index = 10019 OR a_index = 1512;
if you add = before between it will generate a error, and ";" it is not necessary, it only specifices, the query to executes(if you want to execute 2 queries in 1 you will need ";" to separate the queries)
if you run only 1 query ";" is not necessary, only if you run multiple queries in 1 file.(in MSSQL you can run multiple lines without ";", but more queries in 1 will increase the query timeout, plus it has a limit on this, on how big the query is)

