<hibernate-mapping> <classname= "Com.xwtech.mss.pub.po.FrameOrgCityRelation"Table= "Frame_org_city_relation"> <IDname= "Relationid"type= "Java.lang.Long"> <columnname= "relation_id"Precision= "Ten" Scale= "0" /> <Generatorclass= "sequence" > <paramname= "sequence">Frame_seq_org_city</param> </Generator> </ID> <Many-to-onename= "Orgnization"class= "Com.xwtech.mss.pub.po.Orgnization"Fetch= "Select"> <columnname= "org_id"Precision= "Ten" Scale= "0" /> </Many-to-one> < Propertyname= "Cityid"type= "Java.lang.String"> <columnname= "city_id"length= "Ten" /> </ Property> </class> </hibernate-mapping>the corresponding Oracle database asks<columnname= "org_id"Precision= "Ten" Scale= "0" />What is the precision= "ten" scale= "0" in this? Oracle uses, precision= "10" means that the significant number of digits is 10 bits, scale= "0" means that the decimal place is 0, precision means "precision, precision," here represents the number of valid digits of the field. Scale means "scales, ranges of values", that is, the number of decimal digits of the field.
Precision and scale effects in hibernate IDs