sql
stringlengths
6
1.05M
create database email_sender; \c email_sender; create table emails( id serial not null primary key, data timestamp not null default current_timestamp, assunto varchar(100) not null, mensagem varchar(250) not null );
<filename>sql/data/ContractSchedule.sql INSERT INTO [contractschedule] ([ContractScheduleID],[ContractID],[ScheduleDate],[StartTime],[EndTime])VALUES('AE5831C0-FD47-4ECB-BEB1-0768546217AB','F859B433-C863-4798-8C86-08EFCBD90A09','Aug 10 2011 12:00:00:000AM','Aug 10 2011 9:00:00:000AM','Aug 10 2011 6:30:00:000PM') INSE...
--- List of known agents create table agents( agent_id int not null primary key auto_increment, agent_ip int not null, agent_port int not null default 36788, agent_version float not null, is_online tinyint default 0, agent_uuid binary(16) );
CREATE TABLE `gamespace` ( `gamespace_id` int(11) unsigned NOT NULL AUTO_INCREMENT, `gamespace_scopes` varchar(512) NOT NULL DEFAULT '', `gamespace_title` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`gamespace_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
<filename>ORACLE_SQL/SHARED_FUNCTIONS/14_ORG/14F001_ORG.GET_DIV_NAME.sql /* Formatted on 12-20-2018 9:35:41 AM (QP5 v5.126.903.23003) */ CREATE OR REPLACE FUNCTION ORG.GET_DIV_NAME (P_DIVID NUMBER) RETURN VARCHAR2 AS L_RESULT VARCHAR2 (200 BYTE); BEGIN L_RESULT := ''; SELECT DIV_CODE_NAME INTO L...
-- create a database and tables which we will load through a fictitious ETL process CREATE DATABASE C6_R4; CREATE TABLE lineitem_interim_processing ( L_ORDERKEY NUMBER(38,0), L_PARTKEY NUMBER(38,0), L_SUPPKEY NUMBER(38,0), L_LINENUMBER NUMBER(38,0), L_QUANTITY NUMBER(12,2), L_EXTENDEDPRICE NUMBER(12,2), L_DISCO...
-- file:plpgsql.sql ln:1881 expect:false begin my_id_user = sp_id_user( a_login )
ALTER TABLE payment_service_items ALTER COLUMN price_cents DROP NOT NULL; -- Since we don't have pricing yet, any existing records with a price_cents of 0 -- should really be null instead UPDATE payment_service_items SET price_cents = NULL WHERE price_cents = 0;
-- ======================== -- Information -- ======================== -- Direct Link: https://www.hackerrank.com/challenges/weather-observation-station-17/problem -- Difficulty: Easy -- Max Score: 15 -- DBMS: mySQL -- ======================== -- Solution -- ======================== SELECT ROUND(LONG_W...
<gh_stars>0 USE master; CREATE DATABASE dataupload_script
-- @@@ START COPYRIGHT @@@ -- -- Licensed to the Apache Software Foundation (ASF) under one -- or more contributor license agreements. See the NOTICE file -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2...
/****** Object: StoredProcedure [dbo].[UpdateManagerControlParams] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE Procedure dbo.UpdateManagerControlParams /**************************************************** ** ** Desc: ** Changes manager params for set of given managers ** ** ** Retur...
<filename>farrago/unitsql/ddl/privs.sql -- $Id$ -- Test DDL on privileges -- Create a security manager and login as this user to perform all grant -- tests. -- TODO: grant all appropriate system privilege for this user once -- these privs are available. create user SECMAN authorization 'Unknown'; create user SECMAN...
<filename>.erda/migrations/cmdb/20211214-issue-state-circulation.sql CREATE TABLE `erda_issue_state_transition` ( `id` varchar(36) NOT NULL COMMENT 'primary key', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '表记录创建时间', `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMES...
<filename>openGaussBase/testcase/SQL/INNERFUNC/pattern_match/Opengauss_Function_Innerfunc_Similar_Case0033.sql<gh_stars>0 -- @testpoint: 模式匹配操作符SIMILAR TO,使用[...]声明一个数字字符类 DROP TABLE IF EXISTS type_char; CREATE TABLE type_char (string1 int); insert into type_char values (123); SELECT * from type_char where string1 SI...
<gh_stars>0 -- @testpoint: range_list二级分区表修改:rename约束/字段/分区/表,部分测试点合理报错 --step1: 创建表空间; expect:成功 drop table if exists t_subpartition_0217; drop tablespace if exists ts_subpartition_0217; create tablespace ts_subpartition_0217 relative location 'subpartition_tablespace/subpartition_tablespace_0217'; --test1: alter ta...
-- email templates DELETE FROM `sys_email_templates` WHERE `Name` = 't_fb_connect_password_generated'; INSERT INTO `sys_email_templates` (`Name`, `Subject`, `Body`, `Desc`, `LangID`) VALUES ('t_fb_connect_password_generated', 'New Password Generated', '<bx_include_auto:_email_header.html />\r\n\r\n<p><b>Hello <Nick...
<reponame>renandossantoslima/Site_tarefas<filename>banco/tarefas.sql -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Tempo de geração: 13-Jan-2022 às 15:28 -- Versão do servidor: 10.3.16-MariaDB -- versão do PHP: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCO...
SELECT * FROM SYSTEM_CONFIGS WHERE DELETE_FLAG = 0;
<filename>datos/municipios2.sql /* Navicat Premium Data Transfer Source Server : localmariadb Source Server Type : MariaDB Source Server Version : 100128 Source Host : localhost:3306 Source Schema : facturas Target Server Type : MariaDB Target Server Version : 100128 File Enco...
<reponame>SAEON/seacrifog -- (1) Update the sites table ;with jcommops as ( select "Country" country, "Station" station, ST_SetSRID(ST_MakePoint(cast("Longitude" as float), cast("Latitude" as float)), 4326) xyz, 'ARGO' "network" from jcommops_argo_temp union select "Country" country, "Station" statio...
UPDATE LAYER SET REQUIRED_UNIQUE_FIELDS = QUERY_COLUMN_TYPE('KSR_ID') WHERE NAME = 'Rakennukset';
<filename>src/make_data/banner_intervention/banner_selects_results_page.sql /* This query extracts the total number and proportion of sessions that access the checker via the banner intervention that access the results page */ DECLARE start_date STRING DEFAULT "20210803"; DECLARE end_date STRING DEFAULT "20210816"...
<reponame>raphael251/nodebr-treinamento DROP TABLE IF EXISTS TB_HEROIS; CREATE TABLE TB_HEROIS ( ID INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY NOT NULL, NOME TEXT NOT NULL, PODER TEXT NOT NULL ); --create INSERT INTO TB_HEROIS (NOME, PODER) VALUES ('Flash', 'Velocidade'), ('Aquamen', 'Fa...
set define off verify off feedback off whenever sqlerror exit sql.sqlcode rollback -------------------------------------------------------------------------------- -- -- ORACLE Application Express (APEX) export file -- -- You should run the script connected to SQL*Plus as the Oracle user -- APEX_050100 or as the owne...
--############################################################################## -- -- SAMPLE SCRIPTS TO ACCOMPANY "SQL SERVER 2017 ADMINISTRATION INSIDE OUT" -- -- © 2018 <NAME> -- --############################################################################## -- -- CHAPTER 4: PROVISIONING DATABASES -- T-SQL...
<filename>src/test/resources/sql/set/17636136.sql<gh_stars>10-100 -- file:inet.sql ln:98 expect:true SET enable_seqscan TO off
<reponame>smith750/kc<filename>coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.2.1/sequences/KC_SEQ_S2S_USER_ATTACHED_FORM_ATT_ID.sql<gh_stars>0 DELIMITER / CREATE TABLE SEQ_S2S_USER_ATTD_FORM_ATT_ID ( id bigint(19) not null auto_increment, primary key (id) ) ENGINE MyISAM / ALTER ...
<gh_stars>0 alter table apm_package_dependencies drop constraint apm_package_deps_type_ck; alter table apm_package_dependencies add constraint apm_package_deps_type_ck check (dependency_type in ('provides', 'requires', 'extends')); create or replace package apm_package_version as function new ( version_id ...
<filename>build/my-schema.sql create table agendamento_aula_perdida (codigo integer not null auto_increment, data_aula date, local varchar(255), codigo_disciplina integer, codigo_turma integer, primary key (codigo)) create table aluno_matriculado (codigo integer not null auto_increment, matricula varchar(255), data_mat...
CREATE TABLE IF NOT EXISTS ContentRepository ( `uuid` char(36) NOT NULL, `repositoryType` varchar(255) NOT NULL, PRIMARY KEY (`uuid`) ) AS SELECT uuid, 'S3' as repositoryType from S3ContentRepository;
<reponame>ned21/aquilon -- this script add shares not added by upgrade_shares.sql -- also rebinds virtual to these shares. -- NOTE that this script is based on upgrade_shares.sql -- and it fixes the disk - share - cluster relation based on the -- disk - machine - cluster relation. set serverout on set autocommit off ...
<reponame>loujine/musicbrainz-server -- Generated by CompileSchemaScripts.pl from: -- 20150209-extend-aliases-to-more-entities-standalone.sql -- 20150307-other-entities-collections-fks.sql -- 20150317-drop-event-name-constraint.sql -- 20150331-relationship-credits-standalone.sql \set ON_ERROR_STOP 1 BEGIN; ------------...
<reponame>prayjourney/boot-mybatis-mbplus-shiro-es-quartz -- https://docs.spring.io/spring-session/docs/2.1.0.M2/reference/html5/?spm=a2c6h.12873639.0.0.577133bcQsjG5Q#httpsession-jdbc DROP TABLE IF EXISTS `spring_session`; CREATE TABLE `spring_session` ( `primary_id` char(36) NOT NULL, `session_id` char(36) NOT N...
-- @testpoint:opengauss关键字Isolation(非保留),作为表空间名 --关键字不带引号,创建成功 drop tablespace if exists Isolation; CREATE TABLESPACE Isolation RELATIVE LOCATION 'hdfs_tablespace/hdfs_tablespace_1'; drop tablespace Isolation; --关键字带双引号,创建成功 drop tablespace if exists "Isolation"; CREATE TABLESPACE "Isolation" RELATIVE LOCATION 'hd...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 07, 2020 at 11:12 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<reponame>2006-jun15-net/jordan-project-1 -- ****************** SqlDBM: Microsoft SQL Server ****************** -- ****************************************************************** -- ************************************** [dbo].[Customers] CREATE TABLE [dbo].[Customers] ( [Id] int IDENTITY (1, 1) NOT NULL ,...
CREATE TABLE catalogue.CapabilityStatus ( Id int NOT NULL, [Name] nvarchar(16) NOT NULL, CONSTRAINT PK_CapabilityStatus PRIMARY KEY (Id), CONSTRAINT AK_CapabilityStatus_Name UNIQUE ([Name]), );
CREATE OR REPLACE VIEW vw_psa_uat_sb1_mstrsupplorg_dbg AS WITH -- 04-Mar-2021,R.Donakonda: created UAT test dbg view for ods.mastersupplierorganization table psl as ( SELECT /*+ materialize*/ psuid FROM vw_psa_plan_sponsor_list ), new_results AS ( SELECT --+ materialize psl.psuid, mso.* ...
-- examples on aggregate functions -- count, count distinct select count(*), count(manager_id), count(distinct manager_id), count(commission) from employee; -- max, min select max(salary), min(salary) from employee; -- min, max on dates select min(hired), max(hired) from employee; -- sum select sum(salary) from emp...
<gh_stars>0 /*============================================================================ File: 1.5 - LOCK_TIMEOUT.sql Summary: The script demonstrates the behaviour of the session-level option LOCK_TIMEOUT. THIS SCRIPT IS PART OF LECTURE: SQL Server Transactions and Concurrency, SoftUni, Sofia Dat...
<reponame>DIBASSI/ZEUS USE [$(database)] GO ------------------------------------------------------------------------------- PRINT 'Debut DATA' GO ------------------------------------------------------------------------------- DELETE FROM [stg].[YourStageTableName] GO DELETE FROM [stg].[Table1] GO DELETE FROM [ssis]....
<gh_stars>0 CREATE DATABASE IF NOT EXISTS `codeigniter-api` /*!40100 DEFAULT CHARACTER SET utf8 */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `codeigniter-api`; -- MySQL dump 10.13 Distrib 8.0.17, for macos10.14 (x86_64) -- -- Host: localhost Database: codeigniter-api -- ----------------------------------------------...
DROP DATABASE IF EXISTS employee_db; CREATE database employee_db; USE employee_db; CREATE TABLE department ( id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50), PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(50), salary DECIMAL(10,2), department_id INT, PRIM...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 05, 2022 at 12:03 PM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARAC...
-- Edit database_name, wordpressusername, and password; CREATE DATABASE database_name; GRANT ALL PRIVILEGES ON databasename.* TO "wordpressusername"@"localhost" IDENTIFIED BY "password"; FLUSH PRIVILEGES;
<gh_stars>1-10 # --- !Ups CREATE TABLE institution ( id serial, organization_id integer NOT NULL, name text NOT NULL, type integer NOT NULL, CONSTRAINT pk_institution primary key(id), CONSTRAINT fk_institution_organization FOREIGN KEY (organization_id) references organization(id) ); CREATE TABLE acc...
<reponame>EL-BID/nexso<filename>VS2013_PROJECT/DNN_DB/dbo/Tables/dnn_EasyDNNNewsSearchSettings.sql CREATE TABLE [dbo].[dnn_EasyDNNNewsSearchSettings] ( [ModuleID] INT NOT NULL, [SharingPortalID] INT NULL, [DisplayAllAuthors] BIT DEFAULT...
CREATE TABLE [dbo].[ParamDefaultComponents] ( [ComponentGuid] NVARCHAR (128) NOT NULL, [GroupId] NVARCHAR (128) NOT NULL, [Name] NVARCHAR (128) NOT NULL, [Value] FLOAT (53) NOT NULL, CONSTRAINT [PK_dbo.ParamDefaultComponents] PRIMARY KEY CLUSTERED ([ComponentGuid] ASC, [Grou...
<filename>bin/sql/schema_usage.sql WITH "names"("name") AS ( SELECT n.nspname AS "name" FROM pg_catalog.pg_namespace n WHERE n.nspname !~ '^pg_' AND n.nspname <> 'information_schema' ) SELECT "name", pg_catalog.has_schema_privilege(current_user, "name", 'CREATE') AS "create", pg_catalog.has_sche...
WITH ESTOQUEPROD_PAI AS ( SELECT E.CODFILIAL AS FILIAL_PAI, E.DTULTENT AS DTENT_FILIAL2, P.CODPRODMASTER AS COD_PAI, P.DESCRICAO AS PRODUTO_PAI, (E.QTESTGER - E.QTRESERV - E.QTBLOQUEADA) AS QTDISP_PAI FROM PCEST E LEFT JOIN PCPRODUT P ON E.CODPROD = P.CODPROD ...
<filename>createDBandTableCassandra.sql CREATE KEYSPACE IF NOT EXISTS twitterAnalysisDB WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; USE twitterAnalysisDB; Create table IF NOT EXISTS parsedTweetsTable ( userID bigint, tweet_Text text, hashTags ...
<gh_stars>10-100 /* * Tencent is pleased to support the open source community by making BK-BASE 蓝鲸基础平台 available. * * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved. * * BK-BASE 蓝鲸基础平台 is licensed under the MIT License. * * License for BK-BASE 蓝鲸基础平台: * -----------------------------...
<filename>db_definition/Tabels/ums_admin.sql CREATE DATABASE /*!32312 IF NOT EXISTS*/`musicstore` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `musicstore`; DROP TABLE IF EXISTS `ums_admin`; CREATE TABLE `ums_admin` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `username` varchar(200) COLLATE...
<gh_stars>0 USE msdb SELECT database_name [Database], COUNT(backup_set_id) Orphans FROM backupset WHERE database_name NOT IN ('master', 'tempdb', 'model', 'msdb') --(SELECT name FROM master.dbo.sysdatabases) GROUP BY database_name
SELECT ArtistId, Name FROM Artist ORDER BY Artist.Name ;
<reponame>equipo3arrayanes2019/vivero<filename>ProgramAdminAdd.sql<gh_stars>1-10 INSERT INTO Empleado(ci, usuario, contraseña, nombre, telefono, direccion, fechaNacimiento, cargo) VALUES (12345678, "admin", "admin", "Nombre del administrador", "098666666", "<NAME>", "2019-01-01", "Administrador");
<reponame>equipo3arrayanes2019/vivero -- MySQL Script generated by MySQL Workbench -- Tue Nov 12 20:21:13 2019 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET ...
select count(*) from nulls1 where double_6 is not 99.0 98
<filename>sql/member_board_dummy_update.sql -- 백업(backup) create table board2 as select * from board; -- 게시판 필드 추가(userid) alter table board add userid varchar2(10 char); -- 기존 데이터 삭제 delete board; ------------------------------------------- update board set name = m2.name, userid = m2.userid where email in ( s...
<filename>models/jobs/broker.sql {{ config( materialized='incremental', unique_key='BROKERID', schema= 'DIM' ) }} SELECT DISTINCT BkrPSU AS BROKERNAME, BkrCd AS BROKERID, BkrRef AS BROKERREF, {{surrogate_key('BkrCd', 'BkrRef', 'BkrPSU')}} AS BROKERIDSK FROM "PC_FIVETRAN_DB"."SUBSCRIBE_DBO"."USMMAIN"
<reponame>riddopic/chef-server -- Deploy update_acl -- requires: base -- requires: id_resolution_functions BEGIN; -- Function for updating ACLs with arbitrary sets of groups and actors CREATE OR REPLACE FUNCTION update_acl( entity_type auth_type, entity_id char(32), perm auth_permission, a...
<filename>MS_LIBRARY/schema/msDigestionEnzyme.sql<gh_stars>1-10 -- MySQL dump 10.11 -- -- Host: localhost Database: msData -- ------------------------------------------------------ -- Server version 5.0.51a /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@C...
<reponame>tigerwingxys/tigerwingblog -- Copyright 2019 Tigerwing(<EMAIL>) -- -- Licensed under the Apache License, Version 2.0 (the "License"); you may -- not use this file except in compliance with the License. You may obtain -- a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless...
CREATE TABLE `users` ( `id` bigint NOT NULL AUTO_INCREMENT PRIMARY KEY, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `dob` DATE NOT NULL, `create_date` DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, `update_date` DATETIME DEFAULT CURRENT_TIMESTAMP NOT NULL, UNIQUE (`email`) ); CREAT...
<reponame>qiuwenhuifx/PolarDB-for-PostgreSQL -- -- explain analyze for px -- -- create table drop table if exists px_analyze_t1; create table px_analyze_t1 (a int, b int); -- Try EXPLAIN ANALYZE SELECT, but hide the output since it won't -- be stable, only display the analyze_count create function explain_analyze_co...
CREATE TABLE IF NOT EXISTS `battlelog` ( `battlelogid` int(11) NOT NULL, `accid` int(11) NOT NULL DEFAULT 0, `accid_to` int(11) NOT NULL DEFAULT 0, `when` timestamp NOT NULL DEFAULT current_timestamp() ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC; ALTER TABLE `battlelog` ADD PRIMARY KEY (`battle...
<gh_stars>10-100 {% macro get_last_schema_changes_time() %} -- depends_on: {{ ref('elementary_test_results') }} {%- if execute -%} {%- set last_schema_changes_time_query %} select max(detected_at) as last_alert_time from {{ ref('elementary_test_results') }} where test...
with `customer_total_return` as (select `cr_returning_customer_sk` as `ctr_customer_sk`, `ca_state` as `ctr_state`, sum(`cr_return_amt_inc_tax`) as `ctr_total_return` from `catalog_returns` where `cr_returned_date_sk` = `d_date_sk` and `d_year` = 2000 and `cr_returning_addr_sk` = `ca_address_sk` group by `cr_returning_...
/*L Copyright SAIC-F Inc. Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cadsr-password-change/LICENSE.txt for details. L*/ -- @drop_cadsrpasswordchange_user.sql @create_cadsrpasswordchange_user.sql @create_sys.cadsr_users.sql @create_password_verify_cadsr_user.sql @crea...
<gh_stars>0 --############################################################ -- CREATE INDICES TO SPEED UP QUERIES CREATE INDEX activity_person_idx ON "Activity" (person); CREATE INDEX activity_trip_idx ON "Activity" (trip); CREATE INDEX activity_location_idx ON "Activity" (location_id); CREATE INDEX person_household_idx...
<filename>db/seeds.sql<gh_stars>0 USE employee_db; INSERT INTO departments (name) VALUES ("engineering"), ("product"), ("design"), ("sales"), ("marketing"); INSERT INTO roles (title, salary, department_id) VALUES ("Software Engineer", 60000, 1), ("Web Developer", 55000, 1), ("Techni...
--select * from texts order by id desc; --delete from texts where id >= 3 /* 1. READ A text - has one user (author) We return - all the fields in the texts table (the author_id is one of the fields) - a json array of objects relative to all the user that is the author (the array will only have 1 object) */ D...
-- MySQL Script generated by MySQL Workbench -- Mon Jul 4 09:21:48 2016 -- Model: New Model Version: 1.0 -- MySQL Workbench Forward Engineering SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR...
<reponame>destish21/mysqlemployee-tracker<filename>db/seed.sql<gh_stars>0 USE employees; INSERT INTO department (name) VALUE ("Marketing"), ("Finance"), ("Management"), ("Human Resource"), ("IT"); INSERT INTO role (title, salary, department_id) VALUE ("Lead Engineer", 160000, 5), ("Technical P...
-- phpMyAdmin SQL Dump -- version 4.4.15.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 02, 2016 at 03:52 AM -- Server version: 5.6.28 -- PHP Version: 5.5.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
CREATE TABLE [dbo].[User]( [Id] [uniqueidentifier] NOT NULL, [Timestamp] [datetimeoffset](7) NOT NULL, [FirstName] [nvarchar](50) NOT NULL, [LastName] [nvarchar](50) NOT NULL, [Age] [int] NOT NULL, [IsEmployee] [bit] NOT NULL, [Description] [nvarchar](500) NULL, CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED ( [...
insert into api_user(id,name,password) values(1,'<PASSWORD>',null); --主键自增的表,插入数据的时候,不能加主键 insert into api_config(id,vcode,domain_name,ts,user_id) values(1,'hsdA437Se2p3hjdh',null,1,1); --Init数据库驱动表 --delete from api_database; delete from api_user_token; --修改数据库 alter table api_database add column file varchar(100) def...
CREATE DATABASE IF NOT EXISTS `uf3_dwes_ord_2` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `uf3_dwes_ord_2`; -- MySQL dump 10.13 Distrib 8.0.16, for macos10.14 (x86_64) -- -- Host: 127.0.0.1 Database: uf3_dwes_ord_2 -- ------------------------------------------------------ -- Server version 5.7.26 /*!40101 SET @O...
<reponame>caofanCPU/DebuggerBoot -- auto Generated on 2019-08-14 17:22:10 -- DROP TABLE IF EXISTS `time_mark_content`; CREATE TABLE time_mark_content( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'id', `time_block_id` BIGINT NOT NULL DEFAULT -1 COMMENT '时间区块ID', `title` VARCHAR(50) NOT NULL DE...
-- Add new columns to table 'person_profile' ALTER TABLE person_profile ADD COLUMN headline TEXT, ADD COLUMN website TEXT, ADD COLUMN company TEXT, ADD COLUMN profile_type TEXT; -- Drop current_company column from table 'person' ALTER TABLE person DROP COLUMN current_company;
<reponame>elenisproject/internet-and-applications<filename>database-configuration/create-tables.sql<gh_stars>1-10 USE InterntAndApplications; CREATE TABLE general( cord_uid VARCHAR(20) NOT NULL, sha TEXT, source_x VARCHAR(20), title TEXT, doi TEXT, pmcid VARCHAR(50), pubmed_id INT, license ...
USE menagerie; SELECT * FROM event;
<filename>Scopus/Postgres/Ad_hoc/update_log.sql SELECT id, num_scopus_pub, num_scopus_pub - lead(num_scopus_pub) OVER (ORDER BY id DESC) AS delta_with_next, num_scopus_pub - lead(num_scopus_pub) OVER (ORDER BY id DESC) >= 0 AS has_not_decreased FROM update_log_scopus WHERE num_scopus_pub IS NOT NULL ORDER BY ...
<filename>prisma/migrations/20210503195138_/migration.sql -- AlterTable ALTER TABLE "Post" ADD COLUMN "rating" DOUBLE PRECISION NOT NULL DEFAULT 100;
<reponame>aliostad/deep-learning-lang-detection<filename>data/train/sql/b99e1253b5cfe22fc5935219ceb00d21da623c6dVERSION_INFO_CONSTRAINT.sql -------------------------------------------------------- -- Constraints for Table VERSION_INFO -------------------------------------------------------- ALTER TABLE "VERSION_INF...
<gh_stars>10-100 --https://stackoverflow.com/questions/27543873/sqlplus-conditional-execution-with-variable-from-query set define on verify off feedback off serveroutput on whenever sqlerror exit sql.sqlcode rollback prompt prompt Test github.com/OraMUC/table-api-generator prompt ================================...
/*Table Name: 1. HACKERS 2. DIFFICULTY 3. CHALLENGES 4. SUBMISSIONS */ SELECT H.hacker_id, H.name FROM SUBMISSIONS AS S INNER JOIN CHALLENGES AS C ON S.challenge_id = C.challenge_id INNER JOIN DIFFICULTY AS D ON C.difficulty_level = D.difficulty_level INNER JOIN HACKERS AS H ON S.hacker_id = H.h...
\set ON_ERROR_STOP 1 -- This file contains triggers that are necessary (and safe) to create -- on mirror databases. These are NOT created on master/standalone -- databases. -- -- The primary use case is to allow materialized tables to be kept -- up-to-date on mirrors without having to replicate that information. -- Si...
----operators---- DROP OPERATOR IF EXISTS ?& (bigistore, _int4); ---- DROP OPERATOR IF EXISTS %# (NONE, bigistore); ---- DROP OPERATOR IF EXISTS %% (NONE, bigistore); ---- DROP OPERATOR IF EXISTS -> (bigistore, _int4); ---- DROP OPERATOR IF EXISTS -> (istore, _int4); ---- DROP OPERATOR IF EXISTS || (bigistore, bigistor...
SET @db_name := 'xxx'; SET @engine_from := 'MyISAM'; SET @engine_to := 'InnoDB'; CALL changeEngineInDB(@db_name, @engine_from, @engine_to); DROP PROCEDURE IF EXISTS `changeEngineInDB`; #PROCEDURE DELIMITER $$ CREATE DEFINER=`root`@`localhost` PROCEDURE `changeEngineInDB`(IN $db_name VARCHAR(45), IN $engine_from VAR...
<filename>solarnet-db-setup/postgres/updates/NET-8-postgres-add-price-most-recent.sql CREATE OR REPLACE FUNCTION solarnet.maintain_loc_datum_most_recent( d_name TEXT, d_loc_id BIGINT, d_id BIGINT, d_created TIMESTAMP WITH TIME ZONE) RETURNS void AS $BODY$ DECLARE recent timestamptz := NULL; BEGIN EXECUTE...
<filename>common/migrations/20210728133332_exclude_blank_slugs.down.sql drop index if exists c_opportunity_by_slug; create unique index c_opportunity_by_slug on c_opportunity (lower(exterior ->> 'slug'));
<filename>auto03/Consultas.sql<gh_stars>1-10 --Easy consultas --1 SELECT booking_date,nights FROM booking where guest_id = 1183 --2 SELECT arrival_time,first_name,last_name FROM booking,guest WHERE booking.guest_id = guest.id and booking_date = '2016-11-05' order by arrival_time -- 3 SELECT booking_id,room_type_req...
<gh_stars>10-100 -- External tokens should be hard deletable ALTER TABLE external_tokens DROP deleted_at;
//// CHANGE name=change0 CREATE TABLE table90 ( id integer NOT NULL, field1 character varying(30), usertype4field usertype4, usertype7field usertype7, usertype8field usertype8 ); GO //// CHANGE name=change1 ALTER TABLE ONLY table90 ADD CONSTRAINT table90_pkey PRIMARY KEY (id); GO
--# Copyright IBM Corp. All Rights Reserved. --# SPDX-License-Identifier: Apache-2.0 /* * Shows STMM and manual memory area changes from the db2diag.log. Set the DB_DIAG_FROM_TIMESTAMP variable to see data before today */ CREATE OR REPLACE VIEW DB_MEMORY_CHANGE_HISTORY AS SELECT TIMESTAMP , MEMBER , MESSAGE...
<filename>code/ne_0401_match_georegp_island.sql<gh_stars>1-10 --+-----------------+-----+ --| featurecla | n | --+-----------------+-----+ --| Island | 292 | --| Island group | 158 | --+-----------------+----- \set wd_input_table newd.wd_match_geography_regions_polys \set ne_input_table new...
ALTER TABLE oppgave_makstid ALTER COLUMN makstid SET DEFAULT date_trunc('day', now()) + (24*60*60 - 1) * interval '1 second' + INTERVAL '7 DAYS';
CREATE KEYSPACE IF NOT EXISTS springbootcass WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true; CREATE TABLE IF NOT EXISTS springbootcass.book ( id bigint PRIMARY KEY, author text, title text );