In the study of the association of transient drug exposures with acute outcomes, the case-crossover design is an efficient alternative to the case-control approach. This design based exclusively on the case series uses within-subject comparisons of drug exposures over time to estimate the rate ratio of the outcome associated with the drug under study. This design inherently removes the biasing effects of unmeasured, time-invariant confounding factors from the estimated rate ratio, but is sensitive to several assumptions. We illustrated the case-crossover design and explored its sensitivity using data from 4028 cases of gastrointestinal bleeding from the General Practice Research Database in assessing the effects of the drug warfarin. We compared the use of different time window lengths to assess exposure and considered the use of a case-time-control design to account for exposure time trends. The case-crossover approach found no excess risk of bleeding with warfarin exposure [rate ratio 0.98; 95% confidence interval (CI): 0.74-1.28] using a 1-month time window. When we restricted the analysis to subjects with truly transient drug exposure, defined by 1 to 3 prescriptions in the previous year, the rate ratio was 2.59 (95% CI: 1.42-4.74). To consider the longer 1-year exposure time window, the case-time-control approach was used and resulted in a rate ratio of 1.72 (95% CI: 1.08-2.43). In conclusion, the case-crossover design is potentially a powerful approach to assess the risk of drugs. This design is, however, highly sensitive to assumptions about intermittency of drug use and the length of the exposure time window, as demonstrated with the example of bleeding associated with warfarin use.