Skip to content

Tag: ddl

XML Schema totalDigits/fractionDigits vs. SQL precision/scale

I’d like to find out the correspondence between XML Schema totalDigits/fractionDigits and SQL numeric precision/scale. 1) Assume we have the following simple type: How would I represent it in SQL? Let’s assume HSQL dialect (it does not matter much). I’m interested in the most restrictive SQL…

SQL Column definition : default value and not null redundant?

I’ve seen many times the following syntax which defines a column in a create/alter DDL statement: The question is: since a default value is specified, is it necessary to also specify that the column should not accept NULLs ? In other words, doesn’t DEFAULT render NOT NULL redundant ? Answer DEFAUL…