cancel
Showing results for 
Search instead for 
Did you mean: 

Creating Number generators

Former Member
0 Kudos

Hi,

In maxdb you can create Number generator by specifying

CREATE TABLE mytab (seqcol SERIAL PRIMARY KEY, other_col CHAR (20))

so the seqcol generates sequential numbers.

In Web AS netweaver you need to create a datadictionary to specify the create table sql.

How do you specify the default generation of number generators?

thanks

Padmaja

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Padmaja,

When creating tables in Java Dictionary, you can only use data types supported by Open SQL. Since the SERIAL type is not supported, I don't think you can use this function with the Java Dictionary. However,if you need to use it, you could try to register a datasource with Native or Vendor SQL support and then create the table without using Java Dictionary and Open SQL. You can get more information about Open, Native and Vendor SQL in SAP NetWeaver Developer Studio help -> SAP Web AS for J2EE Applications -> Development Manual -> Developing Business Logic -> Java Persistence.

I hope this helps.

Zornitsa

Former Member
0 Kudos

Thanks a lot for the info.

I had read about the native sql and vendor sql and the api's but wanted to see if open sql will be able to create the default type.

Also I read that CMP can create automatic primary keys and the container generates them.

But we are using BMP so cannot use that either.

thanks a lot

Padmaja