An oath of allegiance is an oath whereby a subject or citizen acknowledges a duty of allegiance and swears loyalty to monarch or country. In republics, modern oaths specify allegiance to the country in general, or to the country's constitution. For example, officials in the United States, a republic, take an oath of office that includes swearing allegiance to the United States Constitution. However, in a constitutional monarchy, such as in the United Kingdom, Australia and other Commonwealth realms, oaths are sworn to the monarch.
In feudal times a person would also swear allegiance to his feudal superiors. To this day the oath sworn by freemen of the City of London contains an oath of obedience to the Lord Mayor of the City of London.
Oaths of allegiance are commonly required of newly naturalised citizens (see Oath of Citizenship), members of the armed forces, and those assuming public (particularly parliamentary and judicial) office. Clergy in the Church of England are required to take an Oath of Supremacy acknowledging the authority of the British monarch.
I swear (affirm) allegiance to the King, to the Statute for the Kingdom of the Netherlands, and to the Constitution. I swear (affirm) that I will faithfully perform the duties my office lays upon me. So help me God almighty! (This I declare and affirm) 
In many Commonwealth realms all that is required is an oath to the monarch, and not the constitution or state. There have been moves in some of the realms to make the oath of citizenship sworn by new citizens refer to the country rather than the monarch. However, the oaths sworn by judges, members of parliament, etc., have not been changed. All of these moves have not succeeded as the Queen is the personification of the Canadian, British, or Australian state (or that of any other Commonwealth realm). Allegiance sworn to the monarch is the same as to the country, its constitution or flag. The New Zealand Oath of Allegiance still refers to the Queen of New Zealand. The European Court of Human Rights ruled in 1999 that the oath of allegiance to a reigning monarch is "reasonably viewed as an affirmation of loyalty to the constitutional principles which support... the workings of representative democracy in the respondent State." 
- Oath of Allegiance (Australia)
- Oath of Allegiance (Canada)
- Constitution of Fiji: Chapter 17
- Hitler oath (Germany)
- National Pledge (India)
- Oath of Allegiance (Ireland)
- Oath of Allegiance (New Zealand)
- Oath of Allegiance (Philippines)
- Oath of Allegiance (Sweden)
- Oath of Allegiance (United Kingdom)
- Oath of Allegiance (United States)
- Pledge of Allegiance (Philippine)
- Pledge of Allegiance (South Korea)
- Pledge of Allegiance (United States)
- Loyalty oath
- Oath of Citizenship
- Oath of Office
- South African schools pledge