mazhao89的博客
mazhao89 · 共 3 篇文章
常用SQL语句
select * from tab; create table table_name (id varchar2(2) primary key, name varchar(10) not null, sex varchar2(1) default '0') drop table table_name select * from table_name where ... group by ... having ... order by ... limit ... delete from table_name where .... insert into table_name values (..…
2012-11-23 11:43 · 评论(0)
JSP 3个标签 6个动作命令 9个内置对象 4个作用域
JSP3个标签 <%@ page language="java" import="java.util.*" pageEncoding="utf-8" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> <%@ include file="\/base.jsp" %> JSP6个动作指令 <jsp:include page="path" flush="true"> <jsp:param name="paramName" value="paramValue" /> </jsp:include> <jsp:forw…
2012-11-21 22:11 · 评论(0)
数据库判断取值
如果要对数据库中某一列数据进行分类。一般有3中写法: (比如现在有张商品表protable,表中有3个字段商品序号id,商品名称name,商品价格price。需求是:price大于10的商品名称后面要加上B的后缀,price小于1的后面加上S的后缀,位于价格中间的加上M的后缀) 1 union all方法 select * from ( select name||'S' newname from protable where price < 1 union all select name||'M' newname from protable where price >= 1 and pric…
2012-08-23 09:15 · 个人SQL心得 · 评论(0)