![]() |
Error de sintaxis sql ¿aonde joe? Buenas tardes, resulta k toy haciendo una aplicacion de base datos y me tiene entretenido un puñetero error. Solo me pasa en esta tabla al pasar el mysq al phpmyadmin me da este error: consulta SQL: CREATE TABLE FACTURA( baseimponible float, fechafactura date, fechaentrada date NOT NULL , pagada date, tipoiva enum, nfactura varchar, estado text, nexpedicion int, idfactura int NOT NULL , idproveedor int NOT NULL , suministra_estado text ); MySQL ha dicho: Documentación #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' nfactura varchar, estado text, nexpedicion int, ' at line 5 No veo el puto error, perdon, haber si me podeis echar un cablesito. Muchisimas gracias |
Re: Error de sintaxis sql ¿aonde joe? Pues que con enum tendrás que definir qué es. Ejemplo CREATE TABLE sizes ( name ENUM('small', 'medium', 'large') ); http://dev.mysql.com/doc/refman/5.0/en/enum.html Saludos |
Re: Error de sintaxis sql ¿aonde joe? Gracias por el comentario, pero aun definiendolo me sigue dando el error, he probado kitando ese campo y sigue igual, ainnns k desesperacion. CREATE TABLE FACTURA( baseimponible float, fechafactura date, fechaentrada date NOT NULL , pagada date, tipoiva enum( 'medium', 'large' ) , nfactura varchar, estado text, nexpedicion int, idfactura int UNIQUE NOT NULL , idproveedor int NOT NULL , suministraestado text ); MySQL ha dicho: Documentación #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' estado text, nexpedicion int, idfactura int UN' at line 6 |
Re: Error de sintaxis sql ¿aonde joe? Hola Tienes que asignarle un tamaño a los datos tipo varchar nfactura varchar(15), (o el tamaño que creas conveniente). Cuando diseñes una tabla trata de darle tamaño a todos tus campos saludos! |
help!! hola a todos oigan tengo un error ... en mysql... quiero tener un campo... que va a llevar una cantidad de dinero.. y segun yo debe ser decimal... o float.. o algo asi no?.. pues me marca este error ya en la aplicacion.. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''123123123123.09')' at line 1 |
| La zona horaria es GMT -6. Ahora son las 21:38. |
Desarrollado por vBulletin® Versión 3.8.7
Derechos de Autor ©2000 - 2026, Jelsoft Enterprises Ltd.