
CREATE TABLE IF NOT EXISTS clientes (
	CODIGO INT(11) NOT NULL AUTO_INCREMENT,
	NOME varchar(70) NULL,
	FANTASIA varchar(50) NULL,
	ENDERECO varchar(50) NULL,
	CEP varchar(9) NULL,
	BAIRRO varchar(40) NULL,
	CIDADE varchar(40) NULL,
	UF char(2) NULL,
	CGC varchar(25) NULL,
	INSCEST varchar(25) NULL,
	RG varchar(20) NULL,
	TELEFONE varchar(16) NULL,
	TELEFONE2 varchar(16) NULL,
	CELULAR varchar(16) NULL,
	FAX varchar(16) NULL,
	RAMAL varchar(10) NULL,
	RAMAL2 varchar(10) NULL,
	CONTATO varchar(50) NULL,
	EMAIL varchar(50) NULL,
	OBS varchar(100) NULL,
	TIPO char(1) NULL,
	ULTIMACOMP datetime NULL,
	CADASTRO datetime NULL,
	SALDO double(10,2) NULL,
	CHEQDEV numeric(18, 0) NULL,
	VENDEDOR numeric(18, 0) NULL,
	TRANSP int NULL,
	CONTATOENT varchar(40) NULL,
	ENDENT varchar(50) NULL,
	BAIRROENT varchar(40) NULL,
	CIDADEENT varchar(40) NULL,
	UFENT char(2) NULL,
	CEPENT varchar(11) NULL,
	CONTATOCOB varchar(40) NULL,
	ENDCOB varchar(50) NULL,
	BAIRROCOB varchar(40) NULL,
	CIDADECOB varchar(40) NULL,
	UFCOB char(2) NULL,
	CEPCOB varchar(11) NULL,
	CODBARRA numeric(18, 0) NULL,
	CARTELA numeric(18, 0) NULL,
	CODCID numeric(18, 0) NULL,
	NUM char(15) NULL,
	possuiemai char(10) NULL,
	tipogrupo numeric(18, 0) NULL,
	nomegrupo varchar(50) NULL,
	AutCheque varchar(50) NULL,
	Autoriza varchar(20) NULL,
	RestricSCP varchar(2) NULL,
	RestInt varchar(2) NULL,
	ULTCOMPRA datetime NULL,
	VENCIMENTO char(2) NULL,
	CODCONTA float NULL,
	PROGGUID char(40) NULL,
	SEED1 int NULL,
	SEED2 int NULL,
	SEED3 int NULL,
	IDLICENSA char(30) NULL,
	CODREG char(40) NULL,
	CODFILIAL int NULL,
	IM char(10) NULL,
	COMPL char(80) NULL,
	MARCA2 char(1) NULL,
	NFSe char(1) NULL,
	Bol char(1) NULL,
	MsgNFSe text NULL,
	MsgBol text NULL,
	Reg_Esp int NULL,
	MsgBol2 text NULL,
	DiasProtesto int NULL,
	MultaAtr decimal(8, 2) NULL,
	Juros decimal(8, 2) NULL,
	TarifaBol decimal(8, 2) NULL,
	Deducao decimal(6, 2) NULL,
	EMAIL2 varchar(200) NULL,
	EMAIL3 varchar(200) NULL,
	CodSist int NULL,
	CodCont int NULL,
	TpCliente smallint NULL,
	HTMLBol char(1) NULL,
	HTMLNFSe char(1) NULL,
	ISS decimal(10, 3) NULL,
	TPContrato smallint NULL,
	DtContrato datetime NULL,
	DtVencCont datetime NULL,
	ValorContrato double(10, 2) NULL,
	ItensContrato text NULL,
	TipoContrato int NULL,
	Site varchar(300) NULL,
	VENDEDORCONTRATO int NULL,
	CONTRATOATUAL varchar(15) NULL,
	DtCancelaContrato datetime NULL,
	PosContrato varchar(1) NULL,
	TpContrato2 int NULL,
	CodTribServ int NULL,
	Sistema varchar(30) NULL,
	CodSistema int NULL,
	CodContab int NULL,
	Contador varchar(100) NULL,
	QtdDias int NULL,
	ComissaoContrato double(10, 2) NULL,
	Anotacoes text NULL,
	Ativo smallint NULL,
	Reg int(11) NOT NULL,
	CodPais int NULL,
	Pais varchar(120) NULL,
	PRIMARY KEY ('CODIGO')

)ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;