Content (table),
topic_id (primary key),
data (text)
Topics (table),
topic_id (primary key),
content_type (text)
這兩個表具有相同的主鍵數據(topic_id)。
我需要用文字來更新數據字段(內容表)「已禁用」,但只有在CONTENT_TYPE場(主題表)=文本「裂谷熱」
我可以:SELECT * from topics WHERE content_type = "rvf";
我可以:UPDATE content SET data = ("disabled");
但我怎麼能把這些放在一起。
謝謝你,工作完美。這是SQlite,忘記提及這一點。 – 2011-04-15 22:48:09