github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/ddl/primary_key_transfer.result (about)

     1  drop table if exists test1;
     2  drop table if exists test2;
     3  drop table if exists test3;
     4  create table test1 (
     5  id int(10) primary key,
     6  uname varchar(20) unique key,
     7  sex varchar(10),
     8  birth date,
     9  department varchar(20),
    10  address varchar (50)
    11  );
    12  INSERT INTO test1 VALUES (7369,'SMITH', 'Male', '1980-12-17','ACCOUNTING','NEW YORK');
    13  INSERT INTO test1 VALUES (7499,'ALLEN', 'Female', '1981-02-20','RESEARCH','DALLAS');
    14  INSERT INTO test1 VALUES (7521,'WARD', 'Male', '1981-02-22','SALES','CHICAGO');
    15  INSERT INTO test1 VALUES (7839,'KING', 'Female', '1981-11-17','ACCOUNTING','NEW YORK');
    16  INSERT INTO test1 VALUES (7844,'TURNER', 'Male', '1981-09-08','RESEARCH', 'DALLAS');
    17  INSERT INTO test1 VALUES (7902,'FORD', 'Male', '1981-12-03','ACCOUNTING','NEW YORK');
    18  select * from test1;
    19  id    uname    sex    birth    department    address
    20  7369    SMITH    Male    1980-12-17    ACCOUNTING    NEW YORK
    21  7499    ALLEN    Female    1981-02-20    RESEARCH    DALLAS
    22  7521    WARD    Male    1981-02-22    SALES    CHICAGO
    23  7839    KING    Female    1981-11-17    ACCOUNTING    NEW YORK
    24  7844    TURNER    Male    1981-09-08    RESEARCH    DALLAS
    25  7902    FORD    Male    1981-12-03    ACCOUNTING    NEW YORK
    26  update test1 set id = 1200 where uname = 'TURNER';
    27  drop table test1;
    28  create table test2 (
    29  id int(10),
    30  uname varchar(20)  unique key,
    31  sex varchar(10),
    32  birth date,
    33  department varchar(20),
    34  address varchar (50),
    35  primary key(id)
    36  );
    37  INSERT INTO test2 VALUES (7369,'SMITH', 'Male', '1980-12-17','ACCOUNTING','NEW YORK');
    38  INSERT INTO test2 VALUES (7499,'ALLEN', 'Female', '1981-02-20','RESEARCH','DALLAS');
    39  INSERT INTO test2 VALUES (7521,'WARD', 'Male', '1981-02-22','SALES','CHICAGO');
    40  INSERT INTO test2 VALUES (7839,'KING', 'Female', '1981-11-17','ACCOUNTING','NEW YORK');
    41  INSERT INTO test2 VALUES (7844,'TURNER', 'Male', '1981-09-08','RESEARCH', 'DALLAS');
    42  INSERT INTO test2 VALUES (7902,'FORD', 'Male', '1981-12-03','ACCOUNTING','NEW YORK');
    43  update test2 set id = 1200 where uname = 'TURNER';
    44  select * from test2;
    45  id    uname    sex    birth    department    address
    46  7369    SMITH    Male    1980-12-17    ACCOUNTING    NEW YORK
    47  7499    ALLEN    Female    1981-02-20    RESEARCH    DALLAS
    48  7521    WARD    Male    1981-02-22    SALES    CHICAGO
    49  7839    KING    Female    1981-11-17    ACCOUNTING    NEW YORK
    50  7902    FORD    Male    1981-12-03    ACCOUNTING    NEW YORK
    51  1200    TURNER    Male    1981-09-08    RESEARCH    DALLAS
    52  drop table test2;
    53  create table test3 (
    54  id int unsigned,
    55  uname varchar(20),
    56  sex varchar(10),
    57  birth date unique key,
    58  department varchar(20),
    59  address varchar (50),
    60  primary key(id,uname)
    61  );
    62  INSERT INTO test3 VALUES (7369,'SMITH', 'Male', '1980-12-17','ACCOUNTING','NEW YORK');
    63  INSERT INTO test3 VALUES (7499,'ALLEN', 'Female', '1981-02-20','RESEARCH','DALLAS');
    64  INSERT INTO test3 VALUES (7521,'WARD', 'Male', '1981-02-22','SALES','CHICAGO');
    65  INSERT INTO test3 VALUES (7839,'KING', 'Female', '1981-11-17','ACCOUNTING','NEW YORK');
    66  INSERT INTO test3 VALUES (7844,'TURNER', 'Male', '1981-09-08','RESEARCH', 'DALLAS');
    67  INSERT INTO test3 VALUES (7902,'FORD', 'Male', '1981-12-03','ACCOUNTING','NEW YORK');
    68  update test3 set id = 1200 where uname = 'TURNER';
    69  select * from test3;
    70  id    uname    sex    birth    department    address
    71  7369    SMITH    Male    1980-12-17    ACCOUNTING    NEW YORK
    72  7499    ALLEN    Female    1981-02-20    RESEARCH    DALLAS
    73  7521    WARD    Male    1981-02-22    SALES    CHICAGO
    74  7839    KING    Female    1981-11-17    ACCOUNTING    NEW YORK
    75  7902    FORD    Male    1981-12-03    ACCOUNTING    NEW YORK
    76  1200    TURNER    Male    1981-09-08    RESEARCH    DALLAS
    77  drop table test3;