Enter password: **** Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.0.45-community-nt MySQL Community Edition (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> show daatbases; ERROR 1064 (42000): 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 'daatb ases' at line 1 mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | test | +--------------------+ 3 rows in set (0.00 sec)
mysql> create database tienda_jorge; Query OK, 1 row affected (0.01 sec)
mysql> use tienda_jorge; Database changed mysql> create table clientes ( -> rfc varchar (15) primary key, -> nombre varchar (60) not null, -> credito float -> ); Query OK, 0 rows affected (0.09 sec)
mysql> describe clientes; +---------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+-------------+------+-----+---------+-------+ | rfc | varchar(15) | NO | PRI | | | | nombre | varchar(60) | NO | | | | | credito | float | YES | | NULL | | +---------+-------------+------+-----+---------+-------+ 3 rows in set (0.01 sec)
mysql> create table pedidos ( -> folio varchar (10) primary key, -> fecha date not null, -> total float not null, -> rfc varchar (15) not null, -> foreign key (rfc) references clienetes (rfc) -> ); ERROR 1005 (HY000): Can't create table '.\tienda_jorge\pedidos.frm' (errno: 150)
mysql> create table pedidos( -> folio varchar (10) primary key, -> fecha date not null, -> total float not null, -> rfc varchar (15) not null, -> foreign key (rfc) references clienetes (rfc) -> ); ERROR 1005 (HY000): Can't create table '.\tienda_jorge\pedidos.frm' (errno: 150)
mysql> create table articulos( -> -> numero int primary key, -> -> descripcion varchar(60) not null, -> -> precio float -> -> ); ERROR 1064 (42000): 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 '-> nu mero int primary key, -> descripcion varchar(60) not null, -> preci' at line 2 mysql> create table articulos ( -> numero int primary key, -> descripcion varchar(60) not null, -> precio float -> ); Query OK, 0 rows affected (0.10 sec)
mysql> describe articulos; +-------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------------+-------------+------+-----+---------+-------+ | numero | int(11) | NO | PRI | | | | descripcion | varchar(60) | NO | | | | | precio | float | YES | | NULL | | +-------------+-------------+------+-----+---------+-------+ 3 rows in set (0.01 sec)
mysql> create table pedidos( -> folio varchar (10) primary key, -> fecha date not null, -> total float not null, -> rfc varchar (15) not null, -> foreign key (rfc) references clienetes (rfc) -> ); ERROR 1005 (HY000): Can't create table '.\tienda_jorge\pedidos.frm' (errno: 150)
si se dan cuenat soy principiante........ llevo esta materia..... estoy haciendo una base de datos que se llama tienda...... bueno el caso es que estoy creando las tablas de tienda y la gran pregunta es por que me sale este error en la tabla pedidos............ y en clientes y articulos no si son la misma sintaxis....
por fa despejenme de esta gran duuda mi trabajo es para manana..... de ante mano gracias...........*************es mi primer post*************
|