Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 invalid table name

Author  Topic 

g_p
Starting Member

48 Posts

Posted - 2006-12-01 : 15:10:05
Good evening,

I have created a table named Student and i get the error:invalid table name.
I have changed it many times (like st,stud)and i get the same error.


What shall i do now?

Page47
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2006-12-01 : 15:20:55
Post on an internet forum about an error without any code for someone to debug.

Jay White
Go to Top of Page

g_p
Starting Member

48 Posts

Posted - 2006-12-01 : 16:44:12
Well i did,

create table Student(sid integer,fname varchar(20),lname varchar(20),
instructor_iid integer,
dno integer,
primary key(sid),
foreign key (instructor_iid) references instructor,
foreign key (dno) references department);

when i do @insert
i get that error : insert into values Student(9,'James','James',22,300)
*
ERROR at line 1:
ORA-00903: invalid table name

Of course, before Student i have created instructor and department.

Thanks, in advance!
Go to Top of Page

g_p
Starting Member

48 Posts

Posted - 2006-12-01 : 16:52:40
Well i found my mistake.
I had written insert into values student instead of
insert into student values

Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-12-01 : 16:53:55
This is your error.
insert into values Student

You can check the correct syntax for an INSERT statement in SQL Server Books Online.

CODO ERGO SUM
Go to Top of Page
   

- Advertisement -