Wink Yao
Wink Yao

Reputation: 54

How to drop a table, the name with ‘\t’ in tidb?

This question is originally asked by 'xyz2b' in https://ask.pingcap.com/t/how-to-drop-a-table-the-name-with-t/669

I created two tables one of which contains ‘\t’. I want to drop the table with ‘\t’. Such as ‘test\t’ and ‘test’. I want to drop ‘test\t’ table.

I have tried drop the table; but it does not work.

use command {show tables like ‘ex_secure_TM_ROLE_UPLOAD\t’} can find this table, but use command {show create table ex_secure_TM_ROLE_UPLOAD\t} can’t find this table.

I can only provide photos of the results, because it is in a production environment.

enter image description here

Upvotes: -1

Views: 58

Answers (1)

Wink Yao
Wink Yao

Reputation: 54

This answers was provided by 'WalterWj' in here enter image description here

enter image description here

You can use vim to write SQL files, source can be deleted. The above two diagrams show creating and deleting tests. The tmp.txt file is also here, you notice the comments under the changes

drop_sql.txt

Upvotes: 1

Related Questions