Splitting of articles by article ids: Difference between revisions

From LemonWiki共筆
Jump to navigation Jump to search
(Created page with " == Case1: Articles Numbered IDs == If the article number is a digit, split the article into two parts based on a remainder of 0 or 1, resulting in two nearly equal halves. P...")
 
Line 3: Line 3:
== Case1: Articles Numbered IDs ==
== Case1: Articles Numbered IDs ==
If the article number is a digit, split the article into two parts based on a remainder of 0 or 1, resulting in two nearly equal halves.
If the article number is a digit, split the article into two parts based on a remainder of 0 or 1, resulting in two nearly equal halves.
Part1
 
(1) Part1
<pre>
<pre>
SELECT * FROM articles WHERE MOD(article_id, 2) = 0;
SELECT * FROM articles WHERE MOD(article_id, 2) = 0;
</pre>
</pre>


Part2
(2) Part2
<pre>
<pre>
SELECT * FROM articles WHERE MOD(article_id, 2) = 1;
SELECT * FROM articles WHERE MOD(article_id, 2) = 1;

Revision as of 10:04, 13 December 2023


Case1: Articles Numbered IDs

If the article number is a digit, split the article into two parts based on a remainder of 0 or 1, resulting in two nearly equal halves.

(1) Part1

SELECT * FROM articles WHERE MOD(article_id, 2) = 0;

(2) Part2

SELECT * FROM articles WHERE MOD(article_id, 2) = 1;