1 , select j.id, jt.Name, j.ApproveType , j.ProductCode, j.CustomerCode, u.FullName, jf.Name as jfName, j.ExpectedTime from JudgeOrder as j join JudgeOrderType as jt on j.JudgeType=jt.Id jo
/****** Object: StoredProcedure [dbo].[getSplitValue] Script Date: 03/13/2014 13:58:12 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER PROCEDURE [dbo].[getSplitValue] AS --定义获取GUID ) SET @NEWID= REPLACE(NEWID(),'-','') --判断临时表数据是否存在,如果
需求:把一个表某个字段内容复制到另一张表的某个字段. 实现sql语句1: UPDATE file_manager_folder f1 LEFT OUTER JOIN file_manager_folder f2 ON f1.name = f2.name AND f2.parentId = 54 SET f1.parentId = 54 WHERE f2.name IS NULL AND f1.id IN (1,2,3); 实现sql语句2: update B set extra = A.extr
环境: Mysql数据库 库名:db_name 表名: table_name1 table_name2 查询一个里面所有表的信息: use information_scheam; select * from tables where table_schema = "db_name"; 查询单个表的信息: use information_scheam; select * from tables where table_schema = "db_name" and ta
MySQL利用正则函数替换值 update dateTest set date=REPLACE(date,'/','') where date REGEXP '\/'; SQL语句讲解: -- 将 所有date字段中包含‘/’的数据中的‘/’替换为‘ ’,即删除字段中的‘/’字符 update dateTest set date=REPLACE(date,SUBSTRING(date,INSTR(date,'/')),'') where date REGEXP '\/' SQL之INSTR()函