Be the princess of myself

数据库及sql

上一篇 / 下一篇  2006-12-20 10:54:05 / 个人分类:数据库及查询语言

自从开发通过改了数据库的索引,大大提高了查询速度以后,第一次让我这个不懂数据库的人感到数据库的博大精深了。

sql:

长度函数:length

例:查询student表中姓名的长度

select length(stu.name) from student stu

截取字符串函数:substr()

例:查找学号前两位为12的学生

select * from student stu where substr(stu,1,2)='12'


TAG: 数据库及查询语言

 

评分:0

我来说两句

Open Toolbar