سؤال

Sorry, I know nothing of SQL.

Please can somebody give me the SQL command to perform the following:

  • UPDATE field "difficulty"
  • of TABLE "data"
  • with the value in field "rank" form the table "prime"
  • WHERE the value of field "field2" of table "prime" = value of the field "english" of table "data"

I am using Sqlite.

Thanks for the help.

هل كانت مفيدة؟

المحلول

This untested (obviously, because I don't have your schema), but something like this:

UPDATE data SET difficulty = (SELECT rank FROM prime WHERE field2 = data.english);
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top