Get Getting Started with SQL and Databases: Managing and Manipulating Data with SQL 1st Edition Mark Simon free all chapters
Get Getting Started with SQL and Databases: Managing and Manipulating Data with SQL 1st Edition Mark Simon free all chapters
com
https://ebookmeta.com/product/getting-started-with-sql-and-
databases-managing-and-manipulating-data-with-sql-1st-
edition-mark-simon/
OR CLICK BUTTON
DOWNLOAD NOW
https://ebookmeta.com/product/python-data-persistence-with-sql-and-
nosql-databases-1st-edition-lathkar/
ebookmeta.com
https://ebookmeta.com/product/leveling-up-with-sql-advanced-
techniques-for-transforming-data-into-insights-1st-edition-mark-simon/
ebookmeta.com
https://ebookmeta.com/product/friends-with-benefits-goals-friends-to-
lovers-bad-boy-sports-romance-romance-goals-book-4-1st-edition-barbi-
cox/
ebookmeta.com
https://ebookmeta.com/product/philosophical-trends-in-the-feminist-
movement-2nd-edition-anuradha-ghandy/
ebookmeta.com
https://ebookmeta.com/product/the-appraisal-of-real-estate-15th-
edition-appraisal-institute/
ebookmeta.com
https://ebookmeta.com/product/the-watcher-i-spy-with-my-little-eye-
someone-is-going-to-die-1st-edition-lisa-sell/
ebookmeta.com
https://ebookmeta.com/product/handbook-of-epigenetics-the-new-
molecular-and-medical-genetics-3rd-edition-trygve-o-tollefsbol/
ebookmeta.com
Management 12th Edition Ricky W. Griffin
https://ebookmeta.com/product/management-12th-edition-ricky-w-griffin/
ebookmeta.com
Getting Started
with SQL and
Databases
Managing and Manipulating Data
with SQL
—
Mark Simon
Getting Started with
SQL and Databases
Managing and Manipulating Data
with SQL
Mark Simon
Getting Started with SQL and Databases: Managing and Manipulating Data
with SQL
Mark Simon
Ivanhoe VIC, VIC, Australia
Introduction������������������������������������������������������������������������������������������������������������xxi
v
Table of Contents
Summary������������������������������������������������������������������������������������������������������������������������������������ 18
Writing SQL���������������������������������������������������������������������������������������������������������������������������� 19
Columns��������������������������������������������������������������������������������������������������������������������������������� 20
Comments����������������������������������������������������������������������������������������������������������������������������� 20
Filtering Data������������������������������������������������������������������������������������������������������������������������� 20
Row Order������������������������������������������������������������������������������������������������������������������������������ 21
Clause Order�������������������������������������������������������������������������������������������������������������������������� 21
Coming Up����������������������������������������������������������������������������������������������������������������������������������� 21
Chapter 2: Database����������������������������������������������������������������������������������������������� 23
About the Sample Database�������������������������������������������������������������������������������������������������������� 23
Database������������������������������������������������������������������������������������������������������������������������������� 24
Tables������������������������������������������������������������������������������������������������������������������������������������ 26
Normalized Tables����������������������������������������������������������������������������������������������������������������� 27
Multiple Values���������������������������������������������������������������������������������������������������������������������� 33
Summary������������������������������������������������������������������������������������������������������������������������������� 37
Coming Up����������������������������������������������������������������������������������������������������������������������������� 39
vi
Table of Contents
vii
Table of Contents
viii
Table of Contents
ix
Table of Contents
x
Table of Contents
xi
Table of Contents
CHECK���������������������������������������������������������������������������������������������������������������������������������� 287
Foreign Keys������������������������������������������������������������������������������������������������������������������������ 287
Indexes�������������������������������������������������������������������������������������������������������������������������������� 289
Adding Rows to a Table������������������������������������������������������������������������������������������������������������� 290
Deleting Rows from a Table������������������������������������������������������������������������������������������������������ 292
Adding More Rows�������������������������������������������������������������������������������������������������������������������� 294
Updating Rows�������������������������������������������������������������������������������������������������������������������������� 295
Altering the Table���������������������������������������������������������������������������������������������������������������������� 297
DML in Real Life������������������������������������������������������������������������������������������������������������������������ 299
Security������������������������������������������������������������������������������������������������������������������������������� 299
Front-End Software������������������������������������������������������������������������������������������������������������� 300
Summary���������������������������������������������������������������������������������������������������������������������������������� 301
Data Types��������������������������������������������������������������������������������������������������������������������������� 301
Constraints�������������������������������������������������������������������������������������������������������������������������� 301
Foreign Keys������������������������������������������������������������������������������������������������������������������������ 302
Indexes�������������������������������������������������������������������������������������������������������������������������������� 302
Manipulating Data��������������������������������������������������������������������������������������������������������������� 302
xii
Table of Contents
Index��������������������������������������������������������������������������������������������������������������������� 369
xiii
About the Author
Mark Simon has been involved in training and education
since the beginning of his career. He started as a teacher
of mathematics but soon moved into IT consultancy and
training because computers are much easier to work
with than high school students. He has worked with and
trained in several programming and coding languages and
currently focuses mainly on web development and database
languages. When not involved in work, you will generally
find him listening to or playing music, reading, or just
wandering about.
xv
About the Technical Reviewer
Atul Tyagi is a database developer who has worked
extensively in the field of data analytics for over eight years.
He has worked with various industries, including general
insurance and banking domains, and has contributed
significantly to several projects involving reporting,
datamarts, automation, data model development, and
project migration.
Atul is skilled in SQL, SAS, Python, and ETL tools such as
Informatica, SAS DI, Datastage, and SAS Visual Analytics. His
expertise in these areas has helped numerous organizations
effectively manage and analyze their data, leading to
improved decision-making and business outcomes. Atul has worked with leading
companies such as Accenture Solutions, Wipro Pvt Ltd, Acxiom Technologies, and EXL
Services.
Apart from his professional work, Atul is also passionate about sharing his
knowledge, cloud platforms, and data analytics. In his free time, he enjoys reading,
traveling, and exploring new cuisines.
xvii
Random documents with unrelated
content Scribd suggests to you:
Lord made heaven and earth . . . and rested the seventh day: wherefore the Lord blessed
the sabbath day, and hallowed it."
"REMEMBER!"
What are we to remember? A father goes out in the morning, and as he turns away, he
says, "Remember, children, what I have told you to do!"
So our Heavenly Father says to each one of us, about the Sundays that come every week:
"Remember! This is My Day—it is the Sunday of the Lord thy God!"
Then let us rejoice that such a day is given us. A rest from our lessons; a rest from our
work; a time when we can read a nice book in which we find something to help us about
pleasing God.
Sunday is given us to do good in. Think how our Lord, when He was on earth, went about
healing and comforting on the Sabbath Day! And He told the people "it was lawful to do
good on the Sabbath Day."
If we look out for opportunities, we can think of things to do that will help others. We can
paint texts to send to invalids or to cottages; we can put sacred pictures, if we have any,
into scrap-books for the Children's Hospital, or we can paste some white paper on a used
picture post-card, and write neatly a verse or two of a hymn, and send the cards, when
done, to cheer the wounded soldiers! Such a hymn as "Fight the good fight," or "Jesu,
Lover of my soul," or "I heard the voice of Jesus say."
An elder sister, perhaps, can show the little ones a Bible picture-book, and tell them some
simple stories about Little Samuel or Joseph. Or she can read aloud a Sunday story-book
to the others, while they paint or chalk some outlined texts.
As you begin to "remember" to make God's Day a holy, happy one, you will find that there
are things to do in it, for His sake, that will make you happy, too.
It is a day for worship, for rest, for peace, and for loving ministrations for others, and you
will find that "in keeping His Commandments there is great reward."
XIX. THE POTTER'S VESSEL
THOSE who have visited the East tell us that even to-day the potter still sits at his work,
making jars and jugs to carry the precious water from the wells.
Now we must suppose ourselves entering the little courtyard where the potter sits at work,
or bending our heads to enter the shady little building or shed, where the rays of the mid-
day sun cannot reach him.
He has just brought a lump of clay, and placed it on the middle of his wheel, and with his
feet, he gives the wheel a twist, and begins to mould the great lump of clay into a round
sort of mass.
THE POTTER'S WHEEL.
So the visitor ventures to say: "May I ask what you are making, sir?"
And the potter looks up, with a half-smile, as he answers: "I am going to make a lovely
jar," and then his feet twist the wheel round and round, and the visitor stands by watching.
The potter puts his thumb into the place where the neck of the jar will be, and as he twists
and moulds, the visitor sees before his eyes the ugly bit of clay coming into an elegant
shape.
At length the jar is done, and the visitor asks another question. "What will you do, now?"
he says.
"And then?"
"Then I shall put it into the oven and bake it, so that the shape and the colours will stand
fast."
The visitor hesitates. At length, he asks, "You do not make them all alike? Some are plain
and homely; some are beautiful, and I suppose costly?"
The potter smiles, as he rises and places his jar on a shelf out of harm's way.
"Well, sir," he says, "it's just as I choose to make them! Some are so precious in my eyes
that I love to look at them; some turn out so badly, that I have to mould the clay over
again. Just as I like, sir; just as I like! It is my clay, and my work; but I want the pieces
that I make, to come out beautiful and lovely."
So the potter takes another lump of clay, and goes to his wheel again; and the visitor,
thanking him very much for his kindness, turns away thoughtfully.
Had he not read somewhere in his Bible about the Clay and the Potter?
"Yes," he said to himself at length. "It was in Jeremiah, and when I get back to my Hotel, I
will look it up."
And he found what he wanted, in the 18th Chapter of Jeremiah, where the Lord told the
Prophet to go down to the potter's house, that He might tell him there, what he was to say
to the Jewish people, who at that time were sadly disobedient, and had turned away from
God.
So Jeremiah went down to the Potter's house; and behold, he was making something on
his wheel.
But as he made it, the vessel which he was moulding was marred, or spoilt, under his
hand; so he turned, and made the piece of clay into another shape, as it seemed good to
the potter to make it.
And God said, "O house of Israel, cannot I do with you, as this potter has done with his
clay?"
For God loved the Children of Israel, and He wanted to make them good and beautiful, like
the potter wanted to make his jars.
But the Children of Israel rebelled against God; and though He had sent great deliverances
many times, and brought them right out of the bondage of Egypt, and into the beautiful
land of Canaan, they very quickly forgot Him again.
They forgot all His love towards them, and began to serve other gods, which they made
with their own hands; and they even sacrificed and burned their own sons on their altars.
So God sent Jeremiah with His message to them—that if they would turn away from their
evil ways and come back to Him, He would forgive them and give them every blessing; but
if they refused, then Jerusalem should be destroyed, and God would send those who were
left after the battles into a far country where they should be Captives for seventy years.
Yet even with all these solemn warnings, the Children of Israel—the Jews—refused to obey
God; and very shortly those things came to pass which Jeremiah had told them.
But God has given great promises to the Jews, and He is very patient and longsuffering.
By and by after seventy years, He brought them back in a wonderful way to their own
Land, which they again inhabited, and built cities and lived in them.
But it was not very long before they again began to depart from God's laws; they ceased
to obey those things which were plainly written in the Old Testament Scriptures; and at
last, when Jesus Christ came to earth to be their Messiah and King, they did not remember
all God had said in the Bible about Him, and they rose up against Him, and crucified the
Lord of Glory!
And so, again the Heavenly Father, who calls Himself the Potter, has had to send the Jews
out of their Land, and He is moulding them now by trials and sorrows, so that by and by
they may be purified and restored to His favour.
For when Jesus comes back to Earth, as He surely will, "they will look on Him whom they
have pierced," and will turn to Him, and be saved.
XX. JEHOSHEBA, THE GOOD AUNT
2 KINGS 11.1-21. 2 CHRONICLES 22, 23, AND 24
QUEEN ATHALIAH, the daughter of Ahab and Jezebel, was a very wicked woman.
Her son Ahaziah only reigned one year in Jerusalem, and she was his counsellor to do evil.
But at the end of the year he was slain by Jehu, and the Throne of Judah became empty.
Then Queen Athaliah determined to destroy all the Royal Princes, and ordered all the sons
of Ahaziah to be killed, in order to reign over the Kingdom herself.
But while these terrible scenes were happening, and the Princes of Judah were being killed
one after another, there was a Princess, Ahaziah's sister, who made a brave resolve, and
carried it out most successfully.
She knew that one of the King's sons, whom Athaliah had intended to kill, was a baby of a
year old, and she determined that she would do her utmost to rescue him from the
soldiers who were ordered to carry out this wicked scheme. This Princess was called
Jehosheba, and she was the wife of the High Priest, and evidently could go into the outer
rooms of the Temple.
So while the shouts of the soldiers, and the cries of those who were being murdered, were
filling the air with terrible sounds of confusion, Jehosheba stole swiftly to the place where
she thought she should find the baby boy, and hiding him under her beautiful robes she
bore him into the Temple, far away from the noise and turmoil, and she hid him in a
bedchamber, under the care of his trusted Nurse.
BORE HIM INTO THE TEMPLE.
The bedchamber was probably a little room where the mats and bedding for the priests
who lived in the Temple, were kept, and at night they were brought out and laid upon the
floor in the larger chambers; for that is the custom in the East.
No one missed the little child, for Athaliah believed that all the Royal Princes were slain. So
she immediately put herself on the Throne, and reigned over the kingdom, practising all
her wicked ways as before, in defiance of the Commands of God.
You will not wonder that she came to a very sorrowful end, as we shall hear presently.
Meanwhile, Joash, the little heir to the throne, was kept hidden safely in the Temple. You
can picture to yourselves how Jehosheba would have often gone to that far-off
bedchamber to play with her little nephew, and how she would teach him all she could, to
prepare him for the Kingdom.
It is evident also, when we read the accounts, that her husband, Jehoiada, the High Priest,
was often with the child: for by and by when six years had passed away, and little Joash
was seven years old, Jehoiada determined that he should be crowned King.
So he called the Captains of the army, and they started out all over the land of Judah, and
gathered the Levites from all the cities, and the chief fathers of the people, and they all
came up to Jerusalem.
Then Jehoiada . . . put the crown on his head.
Jehoiada shewed them the little King, and made arrangements for their guarding him on
the Coronation Day. He also armed them with spears and shields and bucklers which had
been King David's, and said to them, "Behold the King's son shall reign, as the Lord hath
said of the sons of David."
So the Captains and the Levites did exactly as Jehoiada told them, and stood on guard
about the King, with their weapons in their hands.
Then Jehoiada brought forward the little son of King Ahaziah, and put the crown on his
head, and the roll of the Testimony in his hand, and they made him King, and Jehoiada
and his sons anointed him; and those about him clapped their hands with joy, and said,
"God save the King!"
But when Athaliah, the wicked Queen, heard the shouting and rejoicing, she hurried into
the House of the Lord, and when she saw the King standing by a pillar, and the Princes and
the trumpeters around him, and all the people rejoicing, and sounding the trumpets, she
rent her clothes and cried, "Treason! Treason!"
But Jehoiada quickly commanded the Captains to seize Athaliah, and take her out of the
Temple, and to kill her with the sword outside the Courts; and there she was slain.
Then Jehoiada made a covenant with the King and all the people, that they should be the
Lord's people, and not idolaters any more; and they went into the house of the idol Baal,
and broke it down; and they broke up the altars of Baal, and his images into small pieces,
and killed the priest of Baal.
So all the people rejoiced greatly, and they brought the King to the King's house, and he
sat on the Throne of Judah.
As long as the faithful High Priest lived, Joash was a good King. Jehoiada was his
counsellor and friend, and under his advice Joash did much to repair the Temple of God.
But when Jehoiada died, Joash fell into evil company. The Princes of Judah came and
persuaded him to go to the Groves and Idols; and the end was, that he brought misery on
himself, and also on the Kingdom which he ruled.
God sent Prophet after Prophet to implore the people to return to the Lord, but Joash went
on in his wrong-doing, even to killing the son of Jehoiada, his old friend and protector.
Joash fell very sick at this time, whether from wounds or from illness, the Bible does not
say; but the servants who waited on him conspired against him, and killed him in his bed.
Oh! What a sorrowful death! No love, no tender pity, but hatred for all the evil he had done
to the Kingdom, over which he might have reigned so gloriously, had he only kept close to
the Lord God, who would surely have established his throne.
ELIJAH was a great Prophet of the Lord; and to him were given more wonderful honours
than were conferred on any other Prophet.
We talk much now-a-days about deeds of bravery, and about the honours which are given
to the men who have thus distinguished themselves; and these honours are given them by
our King, and the brave deeds are spoken of from one end of the world to the other!
He was allowed to go to Heaven without dying; and he was allowed long afterwards to
come back from the glory to talk with the Lord Jesus on the Mount of Transfiguration.
These wonderful "distinctions" were not given him by any earthly king, but by God
Himself; and as we follow out the story of Elijah's life, we shall ourselves, perhaps, have a
peep into that glory which Jesus is even now preparing for those who love and follow Him.
I have read that Elijah's name means "My God is Jehovah!" and it seems to me that this is
a brave motto for each one of us, "My God is Jehovah!" "For in the Lord JEHOVAH is
everlasting strength."
The first mention we have of the Prophet Elijah, who came from the land of Gilead, was in
the reign of King Ahab.
God chose Elijah, who was very brave, to rebuke the king for his many acts of wickedness.
We read that Ahab did more to provoke the Lord God than any of the other kings before
him.
One day Elijah went to Ahab and told him: "As the Lord God of Israel liveth, before Whom
I stand, there shall not be dew nor rain these years, but according to my word."
This loss of rain was doubtless sent as a great punishment for the idolatry and sin into
which the whole people of Israel had fallen.
Then the Word of the Lord came to Elijah, saying, "Turn thee eastward, and hide thyself by
the brook Cherith that is before Jordan."
God did not forget His faithful servant in the famine that was coming; and He told him He
had commanded the ravens to feed him, and that he would be able to drink of the brook.
Here, amidst the rocks and fastnesses, he was safe from the wrath of Ahab and of Jezebel,
Ahab's wife, who hated Elijah with all her heart.
And the ravens brought him bread and flesh in the morning, and bread and flesh in the
evening, and he drank of the brook.
But when the hot days came the brook began to grow less and less, because there had
been no rain, and at last the brook dried up; and then the Word of the Lord came to him
again: "Arise and go to Zarephath, near Sidon: I have commanded a widow woman to feed
thee there."
So Elijah went the long journey to Zarephath, and just outside the gate he saw a woman
gathering sticks; and, too thirsty to wait till he reached her side, he called to her: "Fetch
me, I pray thee, a little water to drink!"
And as she was going to fetch it, he called again: "And bring me a morsel of bread in thine
hand!"
But she quickly answered: "I have not any bread! I have nothing but a little meal in the
bottom of the barrel, and a little oil in a cruse; and I was gathering a few sticks to bake a
little loaf for me and my son, that we may eat it and die!"
The famine was so bad in the land that this was the last bread that poor widow would be
able to get.
But God knew all about it, and He had arranged it all in His loving way.
And she went and did as the Prophet told her, and he, and her house, had enough to eat
all the while the famine lasted.
And since then there are many widows, and many distressed and anxious families, who
have found the God of Elijah the same loving, providing God that this poor widow did.
But by and by there came a still harder trial to that widow's heart. Her precious little boy,
who had been kept alive all through the famine, was very ill, and died.
Then the poor widow was utterly hopeless, and she blamed Elijah and said it was his fault
that this dreadful sorrow had come to her.
Doubtless Elijah had told her much about the Holy God who cannot bear sin, and she
began to look at her past life, and one particular sin came up before her! She told him that
he had come to bring this sin to remembrance, and to slay her son!
But Elijah said, "Give me thy son." And he took him out of her bosom and carried him up
to the loft where he lived, and laid the child upon his own bed.
And Elijah cried to the Lord. (You see he was a man who lived in close touch with God!)
And he said: "O Lord my God, hast Thou brought evil upon the widow with whom I
sojourn, by slaying her son?"
Then he stretched himself upon the child three times. And again he cried to the Lord God,
and said: "O Lord my God, I pray Thee, let this child's soul come into him again!"
"And the Lord heard the voice of Elijah, and the soul of the child came into him again, and
he revived."
"And Elijah took the child, and brought him down . . . and delivered him unto his mother,
and said, 'See! Thy son liveth!'"
"And the woman said to Elijah, 'Now by this I know that thou art a man of God, and that
the Word of the Lord in thy mouth is truth.'"
XXII. RUTH
In the time of the Judges of Israel, before Saul or David had been made kings, there was a
man living at Bethlehem whose name was Elimelech. He had a wife called Naomi, and two
sons called Mahlon and Chilion.
But there came a famine in Bethlehem, and Elimelech and his wife and two sons went out
of Canaan and journeyed into the land of Moab.
But Elimelech died, and Naomi was left with her two sons. These sons married wives in
Moab, but both of them died, and Naomi was then left a desolate widow.
By and by she heard that the famine was over in the land of Canaan, and she started with
her two daughters-in-law to return to Bethlehem.
But after they had set out on their journey, Naomi advised Orpah and Ruth to go back to
their mothers, and prayed that, as they had been so loving and kind to her sons who had
died, God would take care of them, and bless them in Moab.
Then she kissed them, and they all wept together. And they said, "Surely we will go back
with thee to thy people!"
But Naomi did everything she could think of to dissuade them, and at last, with many
tears, Orpah wished her good-bye; but Ruth clung to her.
Then Naomi used another argument: "Behold, thy sister-in-law is gone back to her people
and to her gods—return thou after her."
But Ruth said: "Entreat me not to leave thee or to return from following after thee, for
whither thou goest I will go; thy people shall be my people, and thy God shall be my God!"
So Ruth chose the God of Israel to be her God. And that God Whom she had chosen,
watched over her all her life long, and gave her great happiness and honour, as I shall tell
you by and by.
When Naomi found that Ruth was determined that "naught but death" should part them
she left off persuading her, and they two journeyed on till they came to Bethlehem.
The arrival of strangers at a little town in those days was a great event, and all the people
flocked out of their houses to see who it could be.
But Naomi's heart failed her. She had gone out with husband and sons, and she had
returned desolate; and in her grief she said, "Do not call me 'Naomi'" (that meant
pleasant), "but call me 'Mara'" (which means bitter), "for the Almighty hath dealt very
bitterly with me!"
Poor Naomi! She forgot her sweet daughter Ruth; she forgot the God of Israel whom they
both trusted. For a little while her grief swept over her.
There lived in Bethlehem a rich man, whose name was Boaz, and he was a relation of
Naomi's husband, Elimelech.
When they found that the barley harvest had just begun, Ruth said to her mother-in-law,
"Let me go into the fields to glean corn!"
And when she reached the fields she happened on a field belonging to Boaz; but Ruth did
not know that he was her relative.
When Boaz saw Ruth among the women who had come out to glean, he asked his servant
who was set over the reapers whose damsel she was? And the servant told him that she
had come from Moab with Naomi, and he had let her glean among the reapers.
So Boaz spoke kindly to Ruth, and bade her keep near his maidens; and if she were thirsty
she was welcome to take some of the water which his young men had drawn.
Then Ruth bowed herself to the ground, and thanked Boaz for his kindness to a stranger.
But Boaz told her that he had heard all about her love to her mother-in-law, and how she
had left father and mother to come to a strange land. And then he asked the Lord God of
Israel, under Whose wings she had come to trust, to bless her, and to give her a full
reward for all she had done.
So Boaz told her to come at meal-times and share the food they had; and he gave her
parched corn, some of which she saved to carry to her mother-in-law; and when she had
had sufficient, she went back to her gleaning. And Boaz told his young men to let fall
handfuls on purpose for her, so that by evening she had gathered quite a good quantity.
When Naomi heard all the kindness of Boaz, she told Ruth that he was a near relation, and
she realized that, after all, the Lord had not forsaken her, though in her grief she had
almost thought He had!
She told Ruth to keep fast by the maidens of Boaz. So day after day, till the harvest was
over, Ruth did as Naomi bade her; and as Boaz went to and fro among the reapers, he saw
the modest and sweet behaviour of the young stranger girl, and he determined to ask her
to be his wife. So they were married; and by and by a dear little son was given to them.
And the women said to Naomi: "Bless be the Lord, which hath not left thee without a
kinsman, that his name should be famous in Israel."
So Naomi was comforted, and became a nurse to the babe who was so precious to her.
And his name was famous! For the child was called Obed, and he was in due time the
father of Jesse; and Jesse was the father of David, and through David, years afterwards,
came our Blessed Lord!
Do you not remember how the blind man cried out?—"Jesus, Thou son of David, have
mercy upon me."
XXIII. ON MOUNT GILBOA
As David left Saul, and went back to his stronghold at Engedi, he said to himself: "I shall
one day perish by the hand of Saul! There is nothing better for me than that I should
escape into the land of the Philistines, and Saul will cease to look for me."
So he went with the six hundred men who followed him, and dwelt with Achish, the king of
Gath, for a year and four months.
But, after a time, the Philistines determined to go to battle against the Israelites, and as
David and his men were very friendly with Achish, they marched in the rear of the army
which was gathered together against Saul.
But when the princes of the Philistines found David and his men among the warriors, they
very much objected, telling Achish that when the battle was joined, David would go over to
the other side and fight against the Philistines.
Achish tried to persuade them that David and his men were their friends, but the lords of
the Philistines would not consent; and David had to go back to Ziklag. It would take too
long to tell you here how he found that other enemies had invaded his home, or how he
and his men went after them, and how the Lord helped them to recover their wives and
children and all the spoil that those enemies had taken.
But it seems very wonderful that, in the great battle of the Philistines in which Saul was
killed, the Lord had sent David far away in another direction!
So the Philistines gathered themselves to the battle, and Saul and his sons and all the men
of Israel came out against them.
But the night before the battle Saul had gone to a witch at Endor, and asked her to bring
up Samuel to speak to him. Both he and the witch were very frightened when Samuel
came up—an old man wrapped in a mantle—and Samuel told Saul that God had given the
kingdom to David, and that he and his sons would be killed on the morrow.
Both he and the witch were very frightened when Samuel came up.
So the battle took place the next day on Mount Gilboa; and the Philistines followed hard
upon Saul and his sons, and Saul was sore wounded by the archers.
Then Saul besought his armour-bearer to kill him with his sword lest his enemies should
come and mock him. But his armour-bearer would not, for he was sore afraid.
Then King Saul took his own sword and fell upon it and died. And when his armour-bearer
saw that he was dead, he fell upon his sword too, and died with him.
So Saul died, and his three sons and all his men, that day together.
When the rest of the army who were on the other side of the valley and on the other side
of Jordan saw that Saul and his sons were dead, they fled, and forsook their cities, and the
Philistines came and dwelt in them.
On the next day, the Philistines came to the battlefield to strip the slain, and when they
found the king and his sons, they cut off Saul's head and stripped off his armour, and sent
the news to all the country round; and they published it in the houses of their gods and
made a great rejoicing.
They hung the dead bodies of Saul and his sons on the wall of Bethshan; but when the
inhabitants of Jabeshgilead heard of what the Philistines had done, all the valiant men
arose and travelled all night and took the bodies of Saul and his sons down from the wall;
and the men of Jabesh burnt the bodies, and buried their bones under a tree in Jabesh,
and made a great mourning for their fallen king for seven days.
This is a very sorrowful story. Saul had set out well, and he had everything in life before
him.
He was a great warrior; he had fought many battles against the Philistines and other
enemies on every side; but he spoilt all by one great sin. This was the sin of disobedience.
He had disobeyed God's direct command.
Not long after Saul was made king, God told him to go and utterly destroy the Amalekites,
leaving none behind, not even flocks and herds, or anything that was theirs.
But though Saul went, and gained a great victory over them, he disobeyed God in the end;
for he saved alive the king and the best of the flocks and herds, and all that was good, he
kept.
Then the Lord sent Samuel to Saul. And Saul hastened to meet him with the words:
"Blessed be thou of the Lord! I have performed the commandment of the Lord!"
But Samuel answered: "What meaneth then the bleating of sheep in my ears?"
And Saul answered: "The people spared the best of the flocks to sacrifice to the Lord."
And Samuel said to Saul: "Stay, and I will tell thee what the Lord has said to me this
night."
"When thou wast little in thine own sight, wast thou not made head over the tribes of
Israel? And the Lord sent thee on a journey, and said, 'Go and utterly destroy the sinners
the Amalekites, and fight against them until they be consumed.'"
"Wherefore then didst thou fly upon the spoil, and didst evil in the sight of the Lord?"
"Hath the Lord as great delight in burnt offerings and sacrifices, as in obeying the voice of
the Lord?"
"Because thou hast rejected the word of the Lord, He also hath rejected thee from being
king."
This is the reason why God gave the kingdom to David, and allowed Saul to be killed on
Mount Gilboa.
XXIV. ABSALOM
He was the third son of David, and his mother's name was Maachah, who was the
daughter of the King of Geshur.
He inherited great beauty from both his father and his mother, and was evidently the idol
of David's heart. But with all his fascinating beauty, he was not a good man.
His mother was a heathen princess, and Absalom had not been taught in her home the
justice, the purity, the forbearance, the love, and the fear of God, which ought to be the
ruling-spring of our lives.
His one thought was how to please himself, no matter what impediments stood in his way.
By and by he had cause to be angry with his half-brother Amnon, who had acted very
wickedly; but instead of bringing him to be judged by the law, Absalom secretly plotted to
kill him.
For this purpose, he invited all the king's sons to be present at a great feast; and he gave
his servants orders to set upon Amnon and kill him, when he gave a sign to do so after
supper.
When the rest of the king's sons saw this dreadful deed, they all fled on their mules in hot
haste; but while they were on their way back to Jerusalem, the tidings reached David that
all his sons were dead!
The sorrowful king tore his clothes, and lay upon the earth, and all his servants stood by
with their clothes rent.
But Jonadab, David's nephew, tried to comfort the king, by assuring him that only Amnon
was dead.
While Jonadab was persuading the king that it was not as bad as had first been told him,
they saw a great company coming down the hillside, and Jonadab said to the king:
"See, it is as I said; there are the king's sons!"
Then all David's sons wept for the sad thing which had happened, and David and his
servants wept very much.
But Absalom had fled, and had gone to his mother's relatives at Geshur, where he stayed
three years. And David mourned for his son every day.
At length Joab, the captain of the host, saw that David's heart was bound up in Absalom,
and he persuaded David to send for him to Jerusalem. But though David allowed him to
return, he did not see his face for two whole years.
This made Absalom very angry, and because Joab would not carry his messages to the
king, Absalom told his servants to set fire to a whole field of Joab's wheat: at last Joab
consented to speak to the king, and finally Absalom was allowed to see his father: and
David kissed him.
But what do you think Absalom did to that loving, devoted father?
He sat in the gate of the city and told the people who passed in and out, that if he were
king he would see that every grievance was righted; and he kissed the people as they
came and went, and stole their hearts!
Then Absalom asked permission to go to Hebron, and he sent spies all through the land to
tell every one that at the sound of the trumpet every one was to say, "Absalom is King in
Hebron!"
Thus the conspiracy grew and grew; and I cannot tell you how many sorrowful and wicked
things were done while Absalom tried to get the kingdom!
David was indeed at his wits' end; but he remembered that the Lord was his Refuge, and
he prayed that the Lord would defeat the counsel of those who were plotting against him.
At length Absalom came out against his father with a large army. There was a great battle:
but the people begged David not to go to the battle himself, but to let them fight for him,
and for the kingdom.
So David sat in the gate: and as his armies passed through ready for battle, he said to
Joab, and to all the captains of the host: "Deal gently with the young man, even with
Absalom!" And the people heard him.
So the soldiers went forth into the country, and by and by the battle was chiefly fought in a
large wood, where many of Absalom's army were killed.
As Absalom was riding quickly in the wood to escape from the soldiers, he went under an
overhanging tree in his haste, and his head caught in the boughs and he could not
extricate himself. The mule went on and he was left hanging there.
Some one hurried to Joab and told him, and Joab, disregarding the earnest entreaty the
king had given him, took three darts and thrust them through Absalom's heart.
So he died, and they put his body in a pit in the wood and threw a great heap of stones
upon it.
Absalom had built himself a great tomb in the King's Dale, but he was never laid in it. Oh,
the sorrow of that ending!
When the messengers came in from the battle, as David sat near the gate and watched,
his first question to each runner was: "Is the young man Absalom safe?" And when they
broke it to him, that Absalom had died and the victory had been complete, David turned
from them, and made his way up, weeping, to the chamber over the gate, and as he went,
he said:
"O my son Absalom, my son, my son Absalom! Would God I had died for thee, O Absalom,
my son, my son!"
And five hundred years after that, Jeroboam, King of Israel, made two Golden Calves, and
built two altars, one in Dan at the North of Palestine, and the other in Bethel at the South
of his Kingdom.
He told the people of Israel that it was too far for them to go to worship at Jerusalem,
three times in the year, and that they could go instead to worship his Golden Calf, and
could offer sacrifices upon the altars he had built.
Now God had told the Jews that Jerusalem was the place He had appointed for Worship;
and also that only God's Priests, the sons of Aaron, were to offer either Sacrifices or
Incense to Him.
One day, when King Jeroboam was himself offering incense on the altar he had made in
Bethel, a Prophet of the Lord was sent to him with a message from God.
And this was the message—That one day, on this; very altar, the priests whom Jeroboam
had made from the lowest of the people, should be offered, and their bones should be
burnt upon this altar.
God gave a Sign, by which King Jeroboam should know that the Prophet's words were
true, and that he had been sent by God.
This was the Sign. This altar of Jeroboam's should be rent—torn in pieces—and the ashes
should be scattered on the ground.
King Jeroboam was very angry at the message, and he tried to seize the Prophet, but his
hand dried up, and he could not use it.
And the Sign came to pass at once, for the altar fell to pieces and the ashes were
scattered.
Jeroboam was very frightened, and begged the Prophet to ask the Lord to restore his
hand.
And the Prophet did; and Jeroboam's hand was made quite well again.
A Prophet of the Lord was sent to him with a message from God.
Then the King pressed the Prophet to come in to refresh himself, and to receive a reward.
But the Prophet answered that the Lord had strictly forbidden him to eat bread or drink
water in that place. So he turned away, to go back by another road, as the Lord
commanded him.
For as the Prophet was turning away from Bethel, an old Prophet who lived there, thought
he would ask him to come back and rest at his house. He had heard how the Prophet had
cried against the Altar, and he longed to hear all about it.
But the Prophet again explained that the Lord had forbidden him to eat and drink in that
place.
Then the Old Prophet lied to him, and said that an Angel had told him he was to ask him
home to refresh him.
So the Prophet listened to his fellow-prophet, instead of obeying God, and he turned back
and went in, and ate and drank.
But when he had finished the meal, the Word of the Lord came to the Old Prophet, with a
terrible message to the disobedient man.
"Forasmuch as thou hast disobeyed the Lord, and hast not kept the Commandment which
the Lord thy God commanded thee . . . thy carcase shall not come to be buried in the
sepulchre of thy fathers."
So the Old Prophet gave the message, and he sorrowfully saddled the ass of the
disobedient Prophet, and sent him forth on his return journey. But very soon a lion met
him in the way, and slew him; and his body lay by the roadside, and the lion and the ass
stood by, but the lion did not eat either of them.
By and by people passed that way, and they hastened to the city to tell what they had
seen.
Then the Old Prophet told his sons to saddle his ass, and he hurried along the road until he
came to the spot where the dead Prophet lay. And he found all as he had been told, and
saw that the Lord had not allowed the lion to touch the dead man, or the ass.
Then the old man laid the body of the Prophet on his ass, and brought him back to bury
him in his own grave; and he mourned bitterly for him, for he knew he had tempted him,
and had been the cause of his death.
He charged his sons, that when he came to die, they were to bury him in the same grave
with the Prophet; and he added a solemn assurance that the words of God which the
Prophet had uttered against King Jeroboam's altar in Bethel, and against the other
idolatrous places which he had built, should surely come to pass.
All this was literally fulfilled three hundred years after, in the reign of Josiah, the good
young King. We read the account of it in three verses in 2 Kings 23.15-18.
But King Jeroboam, knowing of this Prophecy, remembering as he must that his withered
hand had been healed by God, did not set his heart to seek God and to find forgiveness.
He went on in his evil ways all his life, until at length we read in the Bible the name by
which he was known after his death, "Jeroboam, the son of Nebat, who made Israel to
sin."
The God who commands will enable us to obey. Let us seek Him with all our hearts: let us
learn His will in the Bible, and then the promise to each one of us will come true—
THEN after a long time, the word of the Lord came to Elijah in the third year of the famine,
saying to him, "Go, show thyself to Ahab; and I will send rain upon the earth."
So Elijah went back from Zarephath, and came down to Samaria to show himself to Ahab;
and the famine was very sore there.
Ahab had a trusted servant called Obadiah, who was governor of his house; and this man
"feared the Lord greatly."
That meant, he did that which would please God, and earnestly obeyed Him in all things.
Once, when the wicked queen, Jezebel, tried to kill all the Prophets of the Lord, Obadiah
took fifty of them and hid them in a cave, and fed them with bread and water, and so
saved their lives.
So because the famine was very terrible in Samaria, Ahab called Obadiah, and told him
that they would both go out into the country with the horses and mules and find all the
brooks and streams that were left, where a little grass might be growing, to save the
horses alive.
Ahab went one way and Obadiah another, and as Obadiah was seeking for water, he met
Elijah, who was on his way to Ahab, as the Lord had told him. When Obadiah saw him, he
bowed himself to the earth before God's Prophet; and then Elijah said, "Go and tell thy
lord that Elijah is here."
Obadiah hesitated very much to carry this message, as he was afraid that the Spirit of the
Lord might carry Elijah away, so that he could not be found. He reminded Elijah that he
had "feared the Lord" since he was a child, but that Ahab would certainly slay him if he
carried such a message to him as that!
Then Elijah promised him, that he would surely show himself to Ahab that very day.
So Obadiah went and told Ahab, and the king came out to meet Elijah.
And Elijah answered, "It is thou and thy father's house that have troubled Israel, because
ye have forsaken the Lord's commandments and have worshipped Baal!"
Then he told Ahab to gather together the people, and all the four hundred and fifty
prophets of Baal, and the four hundred prophets of the grove, who sat down daily at
Jezebel's table, and to take them to Mount Carmel, and meet him there.
So a number of the people, and all the prophets of Baal, came together to Mount Carmel.
And Elijah came to the people, and he said, "How long do you mean to halt between two
opinions? If the LORD be God, follow Him! but if Baal, then follow him."
Then the fire of the Lord fell, and consumed the burnt sacrifice.
Then Elijah said, "I am the only Prophet of the Lord, and Baal's prophets are four hundred
and fifty. Let them therefore give us two bullocks, and let them choose one for themselves
and slay it, and dress it, and put it on the altar, with no fire under."
"And I will slay and dress the other bullock, and put it on the altar, and put no fire under.
And the God that answereth by fire, let Him be God!"
So the priests of Baal took their bullock and did as Elijah had said; and they cried unto the
name of their god from morning until noon, saying, "O Baal, hear us!"
But there was no voice nor any that answered. And they leaped upon the Altar which was
made.
Then Elijah mocked them, and told them to cry aloud, as their god was talking, or on a
journey, or asleep, and must be awaked! And they cried aloud, and cut themselves with
knives. And thus they went on till the time of the evening sacrifice. But there was neither
voice, nor any to answer, nor any that regarded.
Then Elijah said to all the people, "Come near unto me."
And he repaired the Altar of the Lord that was broken down, and built it up with twelve
stones for the twelve tribes of Israel; and he cut a deep trench round the Altar, and put the
wood in order, and cut the bullock in pieces and laid him on the wood.
Then he told the men to fill four barrels with water, and to pour it on the burnt sacrifice
and on the wood; and this he ordered to be done three times, so that the water ran all
about the Altar; and he filled the trench with water.
Elijah knew what his God, Jehovah, was going to do, and what a glorious ending there
would be!
So at the time of the evening sacrifice Elijah drew near to the Altar and prayed: and he
said, "Lord God of Abraham, Isaac, and of Israel, let it be known this day that Thou art
God . . . and that I am Thy servant, and that I have done all these things at Thy word."
"Then the fire of the Lord fell, and consumed the burnt sacrifice, and the wood, and the
stones, and the dust, and licked up the water that was in the trench."
"And when all the people saw it, they fell on their faces: and they said, The Lord, He is the
God; the Lord, He is the God!"
"And Elijah said unto them, Take the prophets of Baal, let not one of them escape! And
they took them and brought them down to the brook Kishon." And they were all killed. The
children of Israel had acknowledged their God at last!
Then Elijah turned to Ahab the king, who, like the people, had cast himself in awe and
reverence upon the ground. And he said to Ahab, "Arise, and eat, for there is a sound of
abundance of rain!"
He shared the glorious triumph when the Children of Israel were brought out of Egypt; and
soon after that, Moses chose Joshua to lead the people to fight against Amalek.
Next we hear of him as the trusted servant (or minister, as it is called in the Bible), who
went up with Moses to the Mountain called Sinai, when Moses received the Ten
Commandments from God.
Joshua did not go all the way with Moses, but waited somewhere on the mountain till
Moses should come down from talking with the Holy God.
And as they went down again, it was he who saw the Children of Israel worshipping the
golden calf below.
Next, Joshua was one of the twelve spies who were sent to search out the Land; and you
will doubtless remember that ten of these spies brought a bad report, and only two of
them, Caleb and Joshua, brought a good report.
He trusted God with all his heart, and the Lord was his sure Refuge and constant Helper.
And it is very wonderful to remember, that among the Israelitish men who came out of
Egypt and wandered in the Wilderness for forty years, the only two who entered the
Promised Land were Caleb and Joshua, the two faithful spies! All the rest of the Israelitish
men who came out of Egypt died in the Wilderness for their disobedience, and only their
children entered the Promised Land.
So as I said, the Lord came and spoke to Joshua, and told him he was to lead the people
into the Land of Canaan.
One day soon after this, Joshua sent two spies to bring back word what kind of a land it
was which he had to conquer. When they came to Jericho they came to the house of a
woman named Rahab, and lodged there.
But the King of Jericho heard of it, and sent to Rahab to give up the men to be killed.
But Rahab had heard of all the wonders that the Lord had done for His people, in bringing
them out of Egypt; how He had dried the Red Sea for the people to pass over, and of other
great victories; and instead of giving up those two Israelites to the King of Jericho, she
quickly hid them on the flat roof of her house, under a lot of flax stalks, and when the
messengers from the King came, they did not find them, and Rahab told the King's soldiers
that they had better seek the men on the road to Jordan, as quickly as they could.
So the King's men went away to look for them, and the City gates were shut, and all was
quiet again.
Then Rahab went up to the roof and told the spies that they must escape at once; and she
begged them to promise her faithfully, that when God had given them the Victory, which
she was sure He would do, that they would save her life.
So the men told her to bind a scarlet cord in her window which was on the outer wall, that
they might recognise the place; and she let them down in the night through this window,
and they got away.
All this the men faithfully carried out, and we read in the 11th of Hebrews, written nearly
1500 years after, that it was by faith that Rahab saved the spies, and by this saved her
own life too.
God loves for us to have faith in Him! And it was this faith in God which made Joshua
courageous all his life.
So Joshua and the people crossed the Jordan and entered into the Land, and came to
Jericho; and one day when Joshua was standing viewing the strength of the City, suddenly
he found Someone by him with a drawn sword in His hand.
So Joshua went to him at once, and asked "if he were going to fight for the Israelites or for
their enemies?"
And the Stranger said: "Nay, but as Captain of the Lord's Host am I now come."
Then Joshua fell on his face and worshipped, for he knew that this was the Lord Who was
speaking to him, and Who had taken the Supreme Command!
No wonder that when Joshua was old, and knew he was going to die, that he called all the
Israelites together, and rehearsed all the wonderful doings of the Lord; and that he begged
them with all his strength to serve and obey the Lord with all their hearts.
So the Israelites promised to be faithful, and while the elders who outlived Joshua were
alive, they did follow the Lord. But after a time they began to forget, and this brought a
great deal of sorrow upon them.
Perhaps you think within yourselves, "I should like to obey God, and follow Him! I wonder
how I could begin?"
Think of Joshua. He followed the Lord wholly—which meant with all his heart. That was the
first thing. So you can pray, "Take my heart, Lord Jesus, and help me to follow Thee!"
Then he obeyed whatever God told him to do. And whatever Command you find in the
Bible, as shewing you God's Will—do it!