`
cbting
  • 浏览: 57750 次
  • 性别: Icon_minigender_1
  • 来自: 汕头
社区版块
存档分类
最新评论
文章列表

update from

    博客分类:
  • sql
update一般用来更新一个表中的字段。 update from可以用表1的B字段的值去更新表2的B字段,例如: update test2 set b=y.b from test2 x,test1 y where x.a=b.a
create PROCEDURE [dbo].[proc_ShowPage] @tblName varchar(255), -- 表名 @strGetFields varchar(1000) = '*', -- 需要返回的列,默认* @strOrder varchar(255)='', -- 排序的字段名,必填 @strOrderType varchar(10)='ASC', -- 排序的方式,默认ASC @PageSize int = 10, -- 页尺寸,默认10 @PageIndex int = 1, ...

mssql有用的函数

    博客分类:
  • sql
随机数; select right(newid(),10) 绝对值(也就是没有出现负数) select abs(-0.99) 比如 1.000003 他就是取2 对于- 1.000003 就取-1 select ceiling(num) from category 比如 1.000003 他就是取1 对于- 1.000003 就取-2 select floor(num) from category 取整数 select cast(num as int) from category 四舍五入 select round(num,2) from category 去随机 ...
<title>登录页面</title></head><body>    <form id="form1" runat="server" method="post" action="index.aspx">    <div>        <asp:TextBox ID="Txtid" runat="server"></asp:TextBox>        <asp:Butto ...
--返回表的字段名称 select name from syscolumns where id=object_id('jobs') --刚看到的.新建一个与a表一样的空的b表 select * into b from a where 1<>1 一些不错的sql语句,自己根据需要收藏吧,分给多点哦:) 1、说明:复制表(只复制结构,源表名:a 新表名:b) (Access可用) 法一:select * into b from a where 1<>1 法二:select top 0 * into b from a 2、说明:拷贝表(拷贝数据,源表名:a 目标表名:b) (A ...
鼠标移上去换色?用jquery去实现;   $(".delete_link").parent().parent().mouseover(function(){                   $(this).css("backgroundColor","#cccccc");                    }) .mouseout(function(){                           $(this).css("backgroundColor","");      ...
INSERT INTO mobile(number,Charges,category,Price) SELECT number,Charges,category,Price FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Excel 5.0;HDR=YES;DATABASE=E:\Book1.xls',sheet1$)
 protected void Button1_Click(object sender, EventArgs e)    {        //PostedFile获取要上传文件的信息        if (this.files.PostedFile.FileName.Length == 0)        {            Page.ClientScript.RegisterStartupScript(Page.GetType(), "message", "<script language='javascript' defer>alert('请 ...
 protected void Button1_Click(object sender, EventArgs e)    {        string from = txtform.Text;        string to = Txtto.Text;        string subject = Txtsubject.Text;        string body = txtbody.Text;        //Utilities.SendMail(from,to,subject,body);        Sendmail(from,to,subject,body);    }   ...
   gvlist.DataKeyNames = new string[] { "id"};            gvlist.DataBind();   int ids =int.Parse( gvlist.DataKeys[e.RowIndex].Value.ToString());  
   GridView1中的属性EnableViewState="true"   protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)        {            if (e.Row.RowType==DataControlRowType.DataRow )            {                 e.Row.EnableViewState = false;            }                   }
          <div id="">          咨询QQ:<span><a target="_blank" href="http://wpa.qq.com/msgrd?V=1&amp;Uin=6192278">               <img alt="点击这里给我发消息" src="http://wpa.qq.com/pa?p=1:6192278:10" /></a></span>         ...
/// <summary>///MD5 的摘要说明/// </summary>public static class MD5{    public  static string GetMD5(string Input, bool Half)    {        string output = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(Input, "MD5").ToLower();        if (Half)//16位MD5加密(取32 ...
go use Eglobalpurchase go select * into ego.dbo.PurchaserList from PurchaserList go 说明一下: go use 原数据库名go select * into 目的数据库名.dbo.目的表名 from 原表名 go
//增加节点;    protected void Button1_Click(object sender, EventArgs e)    {        XmlDocument xdoc = new XmlDocument();        string mappath = Server.MapPath("xml/bolgbooks.xml");        xdoc.Load(mappath);         XmlNode root= xdoc.SelectSingleNode("bookstore"); //找到bookstore的 ...
Global site tag (gtag.js) - Google Analytics