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
 SQL statement

Author  Topic 

sql0009
Starting Member

3 Posts

Posted - 2009-03-05 : 11:32:16
Describe what is wrong with the following code:
Create table 2mydata
(id number(2) primary key,
name char(10),
address varchar(100));
insert into 2mydata values
(123, ‘john’, ‘cork’);
insert into mydata2 values (&&numer, ‘&&namer','&&adder');
insert into mydata2 values (&numer, '&namer', '&adder');

Is it wrong because the table name cannot start with a number

Skorch
Constraint Violating Yak Guru

300 Posts

Posted - 2009-03-05 : 11:41:45
That and number(2) is not a datatype. You can use int instead.

Some days you're the dog, and some days you're the fire hydrant.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-03-05 : 12:49:49
seems like you're not using sql server. this is a sql server forum. post in some other forums if your question is not sql server specific
Go to Top of Page
   

- Advertisement -