This article provides an example to add constraint of primary key in a table.
altertable course addconstraint primary_courseno primarykey(courseno);