打印本文 打印本文 关闭窗口 关闭窗口
ASP添加、删除、修改、数据表SQL语句
作者:武汉SEO闵涛  文章来源:本站原创  点击数2409  更新时间:2011/2/4 14:54:40  文章录入:mintao  责任编辑:mintao

ASP添加、删除、修改、数据表SQL语句。

在进行数据库操作时,无非就是添加、删除、修改,这得设计到一些常用的sql语句,如下:

sql常用命令使用方法:

(1) 数据记录筛选:

sql="select * from 数据表 where 字段名=字段值 order by 字段名 [desc]"

sql="select * from 数据表 where 字段名 like %字段值% order by 字段名 [desc]"

sql="select top 10 * from 数据表 where 字段名 order by 字段名 [desc]"

sql="select * from 数据表 where 字段名 in (值1,值2,值3)"

sql="select * from 数据表 where 字段名 between 值1 and 值2"

(2) 更新数据记录:

sql="update 数据表 set 字段名=字段值 where 条件表达式"

sql="update 数据表 set 字段1=值1,字段2=值2 …… 字段n=值n where 条件表达式"

打印本文 打印本文 关闭窗口 关闭窗口