2.
连接表, 保留左边的表a 所有记录 加 匹配的右边的表的记录
select a.*,b.d13 as username from factor_main a left outer join hrinfo b on a.userid = b.d11a
3.视图MO_RECEIPTREPORT 字段 START_DATE 为DATETIME类型,本意是想查出某月的记录。比如,要找出1月份的记录,这样写
SELECT * FROM MO_RECEIPTREPORT WHERE START_DATE>='2004-01-01' AND START_DATE<'2004-02-01'
改成这样写
SELECT * FROM MO_RECEIPTREPORT WHERE MONTH(START_DATE)='1'
4.查询 not in <>'null'
select * from hrinfo WHERE id NOT IN (SELECT staid FROM hrinfo where staid <> 'NULL' )
5.清空表记录
truncate table usertable
7.第一次读页面
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
8.转int型
int mn = Convert.ToInt32(
9.在cookies中记录 用户id
Response.Cookies["user"]["userid"] = user.Trim();
获取
string userid = Request.Cookies["user"]["userid"].ToString();
10.html中的 框架分割 代码 有框架 就没有<body>
<html>
<frameset border="0" framespacing="0" rows="102px,80%*" frameborder="0" cols="*" />
<frame name="top" src="top.aspx" noresize scrolling="no">
<frameset border="1" framespacing="0" rows="100%,2%" frameborder="NO" target="_parent">
<frame name="mains" src="main.aspx" scrolling="no" noresize>
<frame name="bottomFrame" src="button.aspx" noresize scrolling="no">
</frameset>
</html>