These headaches like migraines and Autonomic Trigeminal Cephalgias are caused by the Trigeminal Nerve but are not cosidered migraine attacks. The common pattern is for their appearance in patients who have a history of migraine. Many cases are infrequent and require no special treatment.
Patients who experience frequent and Severe attacks may be prescribed Indomethacin as a preventive. Unfortunately, Indomethacin is a prescription NSAID with a high rate of gastrointestinal side effects often requiring additional medication for those effects.

Primary stabbing headaches or Ice Pick Headaches often affect the same side as patients experience their migraine attacks.

The stabbing is perceived in the occipital and temporal regions rather than in the face or eye. Many physicians think it does not involve the trigeminal nerve but there is almost a direct or indirect connection to the Trigeminal nervous system which is fully or partially causal for all headaches.
The pain frequently is transient and moves from one location to another.

This headache disorder is different from other headaches that cause stabbing pain due to its irregular occurrence and lack of redness or tearing of the eyes commonly found with SUNCT. The Autonomic cephalgias frequently respond well to Sphenopalatine Ganglion Blocks Attacks occurring at regular intervals in a predictable patterns or including eye redness and tearing and include cluster headache, short-lasting unilateral neuralgiform headache attacks with conjunctival injection and tearing (SUNCT), short lasting unilateral neuralgiform headache attacks with cranial autonomic symptoms (SUNA), or trigeminal neuralgia.

All of these headaches can be eliminated and/or reduced in frequency by decreasing nociception into the trigeminal nervous system with a physiologic diagnostic orthotic.

Ice Pick headaches have previously been called
Ice-pick pains; jabs and jolts; needle-in-the-eye syndrome; ophthalmodynia periodica; sharp short-lived head pain.

Typically Ice Pick Headaches that occur infrequently are not treated because it is difficult to measure effectiveness of treatment but they often resolve when other types of headaches are treated.

TMJ disordrs are frequently called the great Imposter because they masquerade or occur with many different types of headaches.

The ICHD3 Headaches define them as
“Transient and localized stabs of pain in the head that occur spontaneously in the absence of organic disease of underlying structures or of the cranial nerves.”

“Diagnostic criteria:
A. Head pain occurring spontaneously as a single stab or series of stabs and fulfilling criteria B–D
B. Each stab lasts for up to a few seconds (80% last 3 seconds or less)
C. Stabs recur with irregular frequency, from one to many per day
D. No cranial autonomic symptoms (redness of the eye and tearing)
E. Not better accounted for by another ICHD-3 diagnosis.”

REFERENCES
Headache Classification Committee of the International Headache Society (IHS). The International Classification of Headache Disorders, 3rd edition (beta version). Cephalgia. 2013; 33(9) 677-678.