How to add an increasing var +1 if field.tab1=field.tab2 in sql -


If someone can help me, then I have two tables like this:

  Field.tab1 111 1110 1111 1112 field.tab2 111   

I have to update Table 2 like this:

  field.tab2 1113   

Thank you for your prompt response and guidance. Yes, I'm new here and also entering SQL, I have compared two tables I have to compare and unique from another table. Rico There is a need to create a card, because the table will be added in advance, so that's what I did:

  SELECT tab2.field, tab1.field, tab1.field1, tab2.field1 Tab 2 Join Tab 2 on Left Tab 1. Field = Tab 1.   

and manually increment each tab1.field :) Until tab2.field and tab2.field1 are zero, where the field is the number of the customer and the number of field 1 sequence.

The natural answer to this question is:

  update field.tab2 Set col = 1113 where Col = 111;   

I'm not sure if you really need it I am posting it because you are new to stack overflow as much as you can describe what you want to do, The better your answers will be. Apart from this, if you show your endeavors to solve the problem, then it helps a lot.

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -