zoukankan      html  css  js  c++  java
  • sql server 语句

    --create
    -- SQL去除回车符,换行符,空格和水平制表符
    create function RepSymbolChar(@str nvarchar(max))
    returns nvarchar(max)
    as
    begin
    
    set @str=LTRIM(@str)
    set @str=RTRIM(@str)
    set @str=replace(@str,char(9),'') --水平制表符
    set @str=replace(@str,char(10),'') -- 换行    
    set @str=replace(@str,char(13),'') --回车
    return @str 
    end
    go
    if exists(
    SELECT top 1 * FROM pointsection where Content like '%<p>%' and Content not like '%"math-tex"%'
    )
    begin 
    update pointsection set Content=dbo.RepP(Content) where Content like '%<p>%' and Content not like '%"math-tex"%'
    end
    --子查询更新
    select *,(select  content from pointsection0907 where id=p.id)as c from pointsection as p
    where Id in (select  Id from pointsection0907 where id=p.id and content like '%<p>%') and id=7863 
     
    
    --update pointsection set content=(select content from pointsection0907 where id=pointsection.id)
    --where Id in (select Id from pointsection0907 where id=pointsection.id and content like '%<p>%')
  • 相关阅读:
    基础抽象代数
    斜堆
    WC2018
    WC2019
    有向图上不相交路径计数
    生成树计数
    Pr&#252;fer序列
    反演
    1.1 Linux中的进程 --fork、孤儿进程、僵尸进程、文件共享分析
    Python程序的执行过程 解释型语言和编译型语言
  • 原文地址:https://www.cnblogs.com/Hangle/p/5836293.html
Copyright © 2011-2022 走看看