How to use “CREATE TABLE” to define a table structure for flat file with a fixed length?
For instance, CREATE TABLE if not exists chk (businessmode CHAR(14),”first name” char(16), “last name” char(18), company char(50), trade CHAR(35), address char(30), address2 char(30), city char(19), flag char(2),ID char(7), serialNO numeric(6,0),_StuffedColumn char(2) default ‘\r\n’) will define a chk table structure, which the total row length is 229 byte. _StuffedColumn is a special column, which can be used to ignore all noise columns. For instance, you can use “_StuffedColumn char(8) default ‘abceed\r\n'”, or ‘_StuffedColumn char(8)” to ignore 8 byte information of every row. Default value can be omitted, or be a expression. The stuffed column of inserted new row will be set with the default value. BTW, for variable-length file, you shoud use longvarchar or longvarbinary with default value to indicate its terminator signature.