此文转自:http://blog.sina.com.cn/s/blog_439f80c4010094n1.html 创建主键: alter table T add primary key (V) T是表名,V是列名 创建索引: create index F2009100000NMINFOSYS_XIANG on f2009100000nminfo( SYS_XIANG );创建一般索引,索引名为表名+列名 create unique index F2009100000NMINFOSYS_ZDM …
一.查看和建立索引 select * from user_indexes where table_name = 'student' create index i_student_num on student(num) 二.使用索引的注意点 ①类型匹配 若student中num列是varchar类型.语句select * from student where num = 100 该语句被转化为select * from student where to_number(num) = 100.该列的索…