Subject | Newbie Question: Is Firebird SQL really this weird or am I missing something? |
---|---|
Author | Ian Berthon |
Post date | 2003-07-11T21:54:01Z |
Hi!
I'm new to the list and new to Firebird. I'm evaluating Firebird 1.0.3
to use in a number of C++ and Java projects that I'm working on and I
*must* be doing something wrong. Below is a cut'n'paste of my session in
isql...
SQL> create database "test.gdb";
SQL> create table "test"
CON> (
CON> "id" integer not null,
CON> "name" varchar(255),
CON> constraint "PK_TEST" primary key ("id")
CON> );
SQL> show tables;
test
SQL> insert into test (id, name) values (1,"Item1");
Statement failed, SQLCODE = -206
Dynamic SQL Error
-SQL error code = -206
-Column unknown
-Item1
-At line 1, column 23.
SQL> [Lots of variations of the above snipped]
SQL> insert into "test" ("id", "name") values (1,'Item1');
SQL> select * from test;
Statement failed, SQLCODE = -204
Dynamic SQL Error
-SQL error code = -204
-Table unknown
-TEST
-At line 1, column 15.
SQL> select * from "test";
id name
============
===============================================================================
1 Item1
What I don't understand is why everything needs to be quoted (I thought
only keywords need to be quoted in ANSI SQL?). What I was hoping to be
able to do is to have my code working without any major modification on
either a Firebird or MySQL server (I know I'm going to have to do
something in order to handle things like AutoNumber/Generators but I was
hoping I wouldn't need to duplicate all of the SQL) Will somebody please
tell me what I'm doing wrong?
Thanks,
Ian.
I'm new to the list and new to Firebird. I'm evaluating Firebird 1.0.3
to use in a number of C++ and Java projects that I'm working on and I
*must* be doing something wrong. Below is a cut'n'paste of my session in
isql...
SQL> create database "test.gdb";
SQL> create table "test"
CON> (
CON> "id" integer not null,
CON> "name" varchar(255),
CON> constraint "PK_TEST" primary key ("id")
CON> );
SQL> show tables;
test
SQL> insert into test (id, name) values (1,"Item1");
Statement failed, SQLCODE = -206
Dynamic SQL Error
-SQL error code = -206
-Column unknown
-Item1
-At line 1, column 23.
SQL> [Lots of variations of the above snipped]
SQL> insert into "test" ("id", "name") values (1,'Item1');
SQL> select * from test;
Statement failed, SQLCODE = -204
Dynamic SQL Error
-SQL error code = -204
-Table unknown
-TEST
-At line 1, column 15.
SQL> select * from "test";
id name
============
===============================================================================
1 Item1
What I don't understand is why everything needs to be quoted (I thought
only keywords need to be quoted in ANSI SQL?). What I was hoping to be
able to do is to have my code working without any major modification on
either a Firebird or MySQL server (I know I'm going to have to do
something in order to handle things like AutoNumber/Generators but I was
hoping I wouldn't need to duplicate all of the SQL) Will somebody please
tell me what I'm doing wrong?
Thanks,
Ian.