Thufir
2007-06-20 07:41:01 UTC
I'm working from <http://www.oracle.com/technology/pub/articles/haefel-
oracle-ruby.html>, would like to adapt the SQL for MySQL, please. Yes, I
know, that's oracle wheras I'm using MySQL. This website happens to be
the best rails tutorial I can find for my purposes, and I'd like to
follow along with it.
Here's what's happening:
[***@localhost ~]$
[***@localhost ~]$ mysql -u feeds -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20 to server version: 5.0.27
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql>
mysql>
mysql>
mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| Comic |
| Legacy |
| dummy |
| dummy_development |
| feeds |
| mysql |
| test |
+--------------------+
8 rows in set (0.01 sec)
mysql>
mysql> use Comic;
Database changed
mysql>
mysql> show tables;
Empty set (0.00 sec)
mysql>
mysql> CREATE TABLE comics (
-> idNUMBER(10) NOT NULL,
-> titleVARCHAR2(60),
-> issueNUMBER(4),
-> publisherVARCHAR2(60),
-> PRIMARY KEY (id)
-> );
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 '(10) NOT NULL,
titleVARCHAR2(60),
issueNUMBER(4),
publisherVARCHAR2(60),
PRIMARY' at line 2
mysql>
mysql> quit
Bye
[***@localhost ~]$
[***@localhost ~]$ date
Wed Jun 20 08:36:58 BST 2007
[***@localhost ~]$
[***@localhost ~]$
thanks,
Thufir
oracle-ruby.html>, would like to adapt the SQL for MySQL, please. Yes, I
know, that's oracle wheras I'm using MySQL. This website happens to be
the best rails tutorial I can find for my purposes, and I'd like to
follow along with it.
Here's what's happening:
[***@localhost ~]$
[***@localhost ~]$ mysql -u feeds -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20 to server version: 5.0.27
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
mysql>
mysql>
mysql>
mysql>
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| Comic |
| Legacy |
| dummy |
| dummy_development |
| feeds |
| mysql |
| test |
+--------------------+
8 rows in set (0.01 sec)
mysql>
mysql> use Comic;
Database changed
mysql>
mysql> show tables;
Empty set (0.00 sec)
mysql>
mysql> CREATE TABLE comics (
-> idNUMBER(10) NOT NULL,
-> titleVARCHAR2(60),
-> issueNUMBER(4),
-> publisherVARCHAR2(60),
-> PRIMARY KEY (id)
-> );
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 '(10) NOT NULL,
titleVARCHAR2(60),
issueNUMBER(4),
publisherVARCHAR2(60),
PRIMARY' at line 2
mysql>
mysql> quit
Bye
[***@localhost ~]$
[***@localhost ~]$ date
Wed Jun 20 08:36:58 BST 2007
[***@localhost ~]$
[***@localhost ~]$
thanks,
Thufir