Our investigation has some limitations. First, the presence of SARS-CoV-2 RNA does not necessarily indicate the production of infectious virus. Secondly, owing to triage strategies, almost all patients in our hospital were categorised as having general and severe COVID-19; therefore, extrapolating these findings to critically ill patients needs caution. Thirdly, the estimation of the duration of SARS-CoV-2 RNA shedding was limited by the type of respiratory specimen, the frequency of respiratory specimen collection and the lack of quantitative viral RNA detection. Fourthly, we excluded fatal cases from the final analysis because all of them had detectable SARS-CoV-2 RNA until death, and the time to death could not accurately reflect the duration of viral shedding; therefore, the association between viral shedding and mortality could be not assessed. Finally, interpretation of our findings was limited by the sample size and the lack of genetic analysis of the host. Further large-scale cohort studies are still needed to better define the risk factors for prolonged viral shedding, including testing the effect of corticosteroid use, in patients with COVID-19.