简单使用语法: MySql: ALTER TABLE dataset_ods ENGINE = MyISAM; //5.6后的InnoDB支持全文索引 ALTER TABLE dataset_ods ADD FULLTEXT (abstract); SELECT * FROM dataset_ods WHERE MATCH(abstract) AGAINST('XX'); Oracle: CREATE INDEX FullTextIndex_dataset_ods ON dataset_ods(…
SELECT A .constraint_name, A .table_name, b.constraint_nameFROM user_constraints A, user_constraints bWHERE A .constraint_type = 'R'AND b.constraint_type = 'P'AND A .r_constraint_name = b.constraint_nameAND A .constraint_name = UPPE…
SELECT ii.`COLUMN_NAME` FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS ii WHERE ii.`CONSTRAINT_SCHEMA`='xius' AND ii.`TABLE_NAME`='comment_user' AND ii.`REFERENCED_COLUMN_NAME` != 'null'; xius: 数据库名 comment_user: 表名…
MySQL的外键,修改表,基本数据类型,表级别操作,其他(条件,通配符,分页,排序,分组,联合,连表操作): a.创建2张表 create table userinfo(nid int not null auto_increment primary key, name varchar(10), age int, part_nid int )engine=innodb default charset=utf8; create table part( nid int not null auto_in…