Specifying a locking scheme with create table

You can specify the locking scheme for a new table with the create table command. The syntax is:

create table table_name (column_name_list)
      [lock {datarows | datapages | allpages}]

If you do not specify the lock scheme for a table, the default value for your server is used, as determined by the setting of the lock scheme configuration parameter.

This command specifies datarows locking for the new_publishers table:

create table new_publishers 
(pub_id     char(4)      not null,
 pub_name   varchar(40)  null,
 city       varchar(20)  null,
 state      char(2)      null)
lock datarows

Specifying the locking scheme with create table overrides the default server-wide setting.

See “Specifying a server-wide locking scheme” for more information.