I want to put some special constraints over my values in the next table:
CREATE TABLE MyTable
{
id varchar(100) NOT NULL PRIMARY KEY,
first_special varchar(8), <- I want it to have max of 8 symbols with no spaces in it
second_special float <- I want it to have precision of 2 decimal points after the '.'
}
EDIT:
The platform is Microsoft SQL Server.
float(ordoubleor something similar). Those approximate types and what you store there is not necessarily the same that you retrieve later. Usenumericornumberor whatever the name in your DBMS is.