public String createTableSQL(CgFormHeadEntity cgFormHead) {
StringBuilder sb = new StringBuilder();
sb.append("CREATE TABLE ");
sb.append(cgFormHead.getTableName()+" (");
CgFormFieldEntity column,agoColumn = null;
Collections.sort(cgFormHead.getColumns(), new FieldNumComparator());
String idField = "";
Collections.sort(cgFormHead.getColumns(),new FieldNumComparator());
for(int i = 0;i<cgFormHead.getColumns().size();i++){
if(i>0){agoColumn = cgFormHead.getColumns().get(i-1);}
column = cgFormHead.getColumns().get(i);
sb.append(getColumnPorperty(column,agoColumn,false));
if(column.getIsKey().equals("Y")){