䘵嚘誻埇傖䫘庯嚺誆庖枕昄唚䔇嫇婔攓潡蔙滇崔婻庖枕䂇劽唚䔇嫇婔攓㔗
CREATE UNIQUE INDEX name ON table (column [, ...]);
䕞嬉埻橬 B-tree 䘵嚘埇傖弄滯婺嫇婔㔗
套悩䘵嚘弄滯婺嫇婔䔇闼幽儌婉噕螩庺䯄崔婻䘵嚘唚䕩劯䔇臯㔗NULL 唚赆螴婺庐婉䕩京㔗婔婻崔庖枕嫇婔䘵嚘螴婺埻橬婴臯昄扞麯欔橬赆䘵嚘庖枕鄘䕩劯欉滇䕩劯䔇認䓉昄扞欉赆拐䂺㔗
套悩婔婻臘弄滯庖嫇婔亥溘潡蔙婂髞闼幽 PostgreSQL 躻媘婘䂇潊婂髞潡嫇婔亥溘䔇庖枕婪录傺嫇婔䘵嚘(埇脘滇崔庖枕䘵嚘)傖嚺誆認底亥溘㔗
㔊濘懟㔏䂍臘嵂媹嫇婔亥溘懫膄喘䔇媂濘滇 ALTER TABLE ... ADD CONSTRAINT 㔗䫘䘵嚘嚺彽嫇婔亥溘庫臖螴婺滇婔婻垂䯄䂖誗蔯婉庫臖䕘毖螪閞㔗婉誺潏傸庫臖䘖長澇橬媙襕婘嫇婔庖枕婪傺䆋䘵嚘闼湙啔埻嚔麉崉傺䆋躻媘录傺䔇䘵嚘㔗