摘要:
数据插入: ignore关键字会让insert只插入数据库不存在的记录 #向数据表中插入数据 insert into t_dept(deptno,dname,loc) values(60,"后勤部","北京"),(70,"保安部","北京"); #向技术部插入一条员工记录 insert into t 阅读全文
摘要:
使用索引可以加快查询速度 索引的原则 数据量很大,且经常被查询的数据表可以设置索引 索引只添加在经常被作为检索条件的字段上面 不要在大字段上创建索引,字符串过长不适合添加索引 use test; #创建索引 create table t_message ( id int unsigned prima 阅读全文