SQL Script 杂记】的更多相关文章

1.提交sql server中未提交的事务 commit select   @@TRANCOUNT 2.查询存储过程中包含某个字符串的所有存储过程 SELECT *FROM   INFORMATION_SCHEMA.ROUTINESWHERE  ROUTINE_DEFINITION LIKE '%Fetion%'ORDER BY SPECIFIC_NAME 3.删除主键-更改类型-添加主键 ALTER TABLE entry_baseinfo drop pk_entry_baseinfo ALT…
问题 在工作中偶尔会遇到这样的问题:SQL script重复执行时会报错. 理想的状态下,SQL script跑一遍就够了,是不会重复执行的,但是实际情况往往很复杂. 比如Dev同学在开发时在A环境把他写的那个脚本单独执行了一遍,而在下一个测试周期的时候,测试同学又在A环境把所有DB脚本都执行了一遍,然后就报错了. 如下示例,这里错误的原因在于重复创建表. 例1 create table tableA (col1 char(10), col2 number); SQL Error: ORA-00…
In this Document   Goal   Solution   1: How do you enable trace for an API when executed from a SQL script outside of Oracle Applications ?   2: How do you get debug log for an API when executed from a SQL script outside of Oracle Applications ?   a)…
-- MyISAM Foreign Keys显示不了外键,MyISAM此为5.0 以下版本使用 InnoDB 为5.0以上版本使用 drop table IF EXISTS city; CREATE TABLE `city` ( `ID` int(11) NOT NULL AUTO_INCREMENT comment'', `Name` char(35) NOT NULL DEFAULT '' comment'', `CountryCode` char(3) NOT NULL DEFAULT '…
如果有成熟的架构,如何根据数据库关系的表.视图等,进行代码生成架构?减少写代码的时间? -- 考虑主键外键 -- create database geovindu; use geovindu; --2 create table EnterpriseType ( EnterpriseTypeID INTEGER PRIMARY KEY AUTOINCREMENT, EnterpriseTypeName nvarchar(100) not null --企业类型名称 ); insert into E…
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using Microsoft.SqlServer.Management.Common;//需添加microsoft.sqlserv…
How to import .sql script 1.Export .sql from pl/sql developer you can reference to other document in my blog. 2.use @ symbol import write .sql script example  @C:\Users\john\Desktop\12.sql…
1. background in most cases, we want to execute sql script  in doris  routinely. using azkaban, to load data,etc.And we want to pass parameters to the sql script file. we can easily handle such situation in hive. 1.1 hive usage: using -hiveconf:  or…
<?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns…
--------------------------------------------------------------------- -- Inside Microsoft SQL Server 2008: T-SQL Querying (MSPress, 2009) -- Chapter 12 - Graphs, Trees, Hierarchies and Recursive Queries -- Copyright Itzik Ben-Gan, 2009 -- All Rights…