cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

create identity column

oneeyeman1
Participant
0 Likes
28

Hi, ALL,

I have installed 16.1 version of SAP ASE.

Then I started the dbisql and tried the following:

 

CREATE TABLE leagues(id integer identity primary key, name varchar(100), drafttype integer, scoringtype integer, roundvalues integer, leaguetype char(5), salary integer, benchplayers integer);

 

This command gave an error.

 

Then I tried:

 

CREATE TABLE leagues(id int identity primary key, name varchar(100), drafttype integer, scoringtype integer, roundvalues integer, leaguetype char(5), salary integer, benchplayers integer);

 

and that succeeded.

 

Shouldn't the first succeed as well?

 

Then I tried the following:

 

INSERT INTO leagues VALUES(1,'Demo - Roto (Auction)',1,1,1,'demo',260,0);

 

That failed with the explanation that I need to supply the field list.

So then I tried:

 

INSERT INTO leagues(id, name, drafttype, scoringtype, roundvalues, leaguetype, salary, benchplayers) VALUES(1,'Demo - Roto (Auction)',1,1,1,'demo',260,0);

That also failed.

However doing:

 

INSERT INTO leagues(name, drafttype, scoringtype, roundvalues, leaguetype, salary, benchplayers) VALUES('Demo - Roto (Auction)',1,1,1,'demo',260,0);

 

succeeded.

Shouldn't the second INSERT succeed as well?

 

Thank you.

 

Accepted Solutions (0)

Answers (0)