1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee
This commit is contained in:
2022-09-25 01:39:19 +08:00
parent 8855178ffb
commit 642242afb0
3 changed files with 5 additions and 4 deletions

10
sql/old/tmp_table.sql Normal file
View File

@@ -0,0 +1,10 @@
-- CREATE TEMPORARY TABLE tmp_table SELECT distinct text FROM answer
drop table if exists tmp_table;
CREATE TABLE tmp_table SELECT distinct text FROM answer order by text;
drop table if exists answer;
ALTER TABLE tmp_table RENAME answer;
ALTER TABLE `answer`
ADD COLUMN `id` int NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (`id`),
ADD UNIQUE INDEX(`text`);