CreateIndex is used to create indexes in tables. Indexes are used to speed up searches/queries. This method may needs some privilege according to the database product and its version.

PRIMARY KEY cannot be created independent from a table, it can only created during table creation or deletion. Examples Following section demonstrates how to create index for a table.
        using(var exc = cn.Executer()) 
        {
			// by table alias
			var t0 = new Orders().AsQueryable();
			exc.CreateIndex(t0, t0.Indexes.First(), "my_index");

			// by table name
			exc.CreateIndex("table1", true, new[] { "column1", "column2" }, "my_index");
        }
	
vFa43T