This topic describes errors related to non-existent tables and the troubleshooting procedure.
Error: ERROR 1146
Error code
Error code in OceanBase Database: 5019
MySQL error code: 1146
Example
When you query the student table, this error is returned, indicating that the table does not exist.
obclient> desc student;
ERROR 1146 (42S02): Table 'test.student' doesn't exist
Troubleshooting procedure
If the table does not exist, execute the
CREATE TABLEstatement to create the required table. Sample code:CREATE TABLE student( id int, name varchar(18), sex char(1), age int, address varchar(200), email varchar(100), date date, PRIMARY KEY (id) );Query the table again.
obclient> desc student; +---------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +---------+--------------+------+-----+---------+-------+ | id | int(11) | NO | PRI | NULL | | | name | varchar(18) | YES | | NULL | | | sex | char(1) | YES | | NULL | | | age | int(11) | YES | | NULL | | | address | varchar(200) | YES | | NULL | | | email | varchar(100) | YES | | NULL | | | date | date | YES | | NULL | | +---------+--------------+------+-----+---------+-------+ 7 rows in set