sql
stringlengths
6
1.05M
create table product ( product_code CHAR(10) primary key not null comment '商品编号,主键', product_name VARCHAR(256) comment '商品名称', product_price DECIMAL(20) comment '价格(厘)', store_no VARCHAR(32) comment '店铺号', product_status CHAR(1) not null comment '状态:0=下架,1=上架', on_sale_time TIMESTAMP comm...
<gh_stars>1-10 -- example query SELECT * FROM USERS
<filename>4_Experiment2/OurProposed/ExtractPredictors/sbl_feature.sql -------------------------------------------- area Alter table street_blocksl drop column if exists SB_area; Alter table street_blocksl Add column SB_area double precision DEFAULT 0.0; UPDATE street_blocksl SET SB_area = completenessPoly.SB_area FROM...
<filename>data/train/sql/b648e4def0c9aaff90f7e41ff3b9ed7c383aa4c6createDb.sql CREATE DATABASE AirNav; USE AirNav; CREATE TABLE NavAid( NavAidID varchar(10) PRIMARY KEY, NavAidName varchar(50), NavAidLocation point NOT NULL, NavAidStation varchar(50), NavAidFrequency float, SPATIAL INDEX(NavAidLocation) ) ENGIN...
--#======================================================================================================================# --# # --# AzureSynapseScriptsAndAccelerators - PowerShell and T-SQL Utilities ...
<filename>DatabaseUsage/Work 5/test/12.sql<gh_stars>1-10 SELECT SalesOrderDetail.SalesOrderID
 FROM Sales.SalesOrderDetail
 JOIN Sales.SalesOrderHeader ON SalesOrderDetail.SalesOrderID = SalesOrderHeader.SalesOrderID
 WHERE OrderDate < ALL (
 SELECT DISTINCT OrderDate
 FROM Sales.SalesOrderDetail
 JOIN Sales.SalesOrd...
alter table User2 drop (regdate, regtime); alter table User2 add (regdatetime date default sysdate); alter table Room modify (datetime date default sysdate); alter table Post modify (datetime date default sysdate); alter table Comment2 modify (datetime date default sysdate); alter table Message modify (datetime date de...
create table dbo.BetList ( SurebetId bigint not null, SideIndex tinyint not null, BetId bigint not null, Price decimal(9, 5), Stake decimal(9, 5), WinLoss ...
#Airbnb SQL SET NAMES UTF8; DROP DATABASE IF EXISTS Airbnb; CREATE DATABASE Airbnb CHARSET = UTF8; USE Airbnb; #城市表 CREATE TABLE Airbnb_City( City_id INT PRIMARY KEY AUTO_INCREMENT, City_name VARCHAR(64) UNIQUE ); #房屋时间表 CREATE TABLE Airbnb_House_Time( Time_id INT PRIMARY KEY AUTO_INCREMENT, Time_House_id INT, T...
<filename>mysql/create-table/HashTag.sql CREATE TABLE `HashTag` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `hash_tag` varchar(255) NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `hash_tag_type` v...
<reponame>OHDSI/TxPath --CREATE SEQUENCE ${ohdsiSchema}.seq_pnc_stdy --CREATE SEQUENCE seq_pnc_stdy --START WITH 1 --INCREMENT BY 1 --MAXVALUE 9223372036854775807 NO CYCLE; CREATE TABLE ${ohdsiSchema}.panacea_study ( study_id INT IDENTITY (1, 1) PRIMARY KEY, -- study_id BIGINT NOT NULL DEFAULT NEXT VALUE...
DROP TABLE IF EXISTS task; CREATE TABLE task ( id VARCHAR(63) NOT NULL COMMENT '主键', depend_id VARCHAR(255) NULL COMMENT '依赖的任务主键', group_id VARCHAR(255) NOT NULL COMMENT '任务组标识,一组任务共同完成一个目标', input VARCHAR(1022) COMMENT '输入参数,json格式数组', body VARCHAR(255) NOT NU...
<reponame>linamrth/bsmarta-web<filename>bsmarta.sql -- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 24, 2018 at 01:51 PM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSA...
DROP OPERATOR ~ (none, bit);
-- MySQL dump 10.13 Distrib 5.5.41, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: prueba -- ------------------------------------------------------ -- Server version 5.5.41-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CH...
<filename>openGaussBase/testcase/KEYWORDS/Including/Opengauss_Function_Keyword_Including_Case0027.sql<gh_stars>0 -- @testpoint:opengauss关键字Including非保留),作为序列名 --关键字不带引号-成功 drop sequence if exists Including; create sequence Including start 100 cache 50; drop sequence Including; --关键字带双引号-成功 drop sequence if exists "...
--USER INFO CREATE TABLE USER( uId INT(11) NOT NULL AUTO_INCREMENT, userName VARCHAR(20), password VARCHAR(20), CONSTRAINT uId_pk PRIMARY KEY(uId) ); CREATE TABLE CLIENT( uId INT(11) DEFAULT NULL, fName VARCHAR(20), lName VARCHAR(20), emailAddress VARCHAR(40), street VARCHAR(50), city VARCHAR(20), zip INT, CONSTRAINT...
<reponame>AscenKeeprov/Database-Basics USE SoftUni SELECT TOP(5) e.EmployeeID, e.FirstName, e.Salary, d.[Name] AS DepartmentName FROM Employees AS e JOIN Departments AS d ON d.DepartmentID = e.DepartmentID WHERE e.Salary > 15000 ORDER BY e.DepartmentID
<reponame>Buithienphuoc/DBAGroupAsm /* Step 1: Create role */ CREATE ROLE 'customer','admin'; GRANT SELECT ON assignment_1.auction_product TO 'customer'; GRANT SELECT ON assignment_1.transaction_history TO 'customer'; GRANT ALL ON assignment_1.* TO 'admin'; CREATE USER 'fake_customer'@'localhost' IDENTIFIED BY '1234...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Mar 06, 2020 at 09:47 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
insert into locatie values(1, 'Splaiul Independentei 204', 'Bucuresti', 'Romania'); insert into locatie values(2, 'Bulevardul Iuliu Maniua 104', 'Bucuresti', 'Romania'); insert into locatie values(3, 'Strada Zavoiului 39', 'Chisinau', 'Republica Moldova'); insert into locatie values(4, 'Bergen Strasse 3', 'Berlin', 'Ge...
<reponame>sebsmgzz/Celebi -- ================================================= -- Restore help -- Returns the location of the restore files. -- ================================================= -- @BakPath The absolute path to the restore (.bak) file. DECLARE @BakPath NVARCHAR(150) = 'C:\MSSQL\Backup\MyDatabase_LogBac...
drop table if exists MB_GUARANTY_STYLE; /*==============================================================*/ /* Table: MB_GUARANTY_STYLE */ /*==============================================================*/ create table MB_GUARANTY_STYLE ( GUARANTY_STYLE varchar(6) not null c...
SELECT * FROM information_schema.events WHERE event_schema=:object_owner AND event_name=:object_name\G
<gh_stars>10-100 CREATE TABLE IF NOT EXISTS `Names` ( `ID` INT NOT NULL PRIMARY KEY, `Category` TEXT NOT NULL, `Name` TEXT NOT NULL ); CREATE TABLE IF NOT EXISTS `Resources` ( `ID` INT NOT NULL PRIMARY KEY, `TypeID` INT NOT NULL, `Path` TEXT, FOREIGN KEY(`TypeID`) REFERENCES `Names`(`ID`) ON DELETE CASC...
<reponame>ObliviousAI/smartnoise-sdk SELECT "Foo". FROM BAR; SELECT Sales * + 7 FROM BAR; SELECT Sales * 0.01 + AS Pct FROM BAZ; SELECT (3 + (Foo / Bar)) FROM Baz + Bar; SELECT - Foo / ((([alias].[BAR]))) AS BIP FROM BAZ; SELECT A WHERE B = 7; SELECT A. B FROM BAR; SELECT ""' FROM Z; SELECT ''' FROM BAZ; SELECT """ FR...
{#=========================Create new extension======================#} {#===Generates comments and code for SQL tab===#} {% if display_comments %} -- Extension: {{ conn|qtIdent(data.name) }} -- DROP EXTENSION {{ conn|qtIdent(data.name) }}; {% endif %} {% if data.name %} CREATE EXTENSION {{ conn|qtIdent(data.name) }}...
CREATE FUNCTION [DataLoadSimulation].[GetCityLocation] (@CityID INT) RETURNS GEOGRAPHY AS BEGIN /* Notes: Returns the location for the passed in city id Usage: DECLARE @myLoc GEOGRAPHY = [DataLoadSimulation].[GetCityLocation] (1) SELECT @myLoc */ DECLARE @Loc AS GEOGRAPHY SELECT TOP 1 @Loc = [Locati...
<reponame>xcxlegend/php-admin<gh_stars>0 INSERT INTO `fa_test`(`id`, `admin_id`, `category_id`, `category_ids`, `week`, `flag`, `genderdata`, `hobbydata`, `title`, `content`, `image`, `images`, `attachfile`, `keywords`, `description`, `city`, `json`, `price`, `views`, `startdate`, `activitytime`, `year`, `times`, `refr...
INSERT INTO college (id, name, city) VALUES (1, 'University of California', 'Berkeley') ON CONFLICT (id) DO NOTHING; INSERT INTO college (id, name, city) VALUES (2, 'Harvard University', 'Cambridge') ON CONFLICT (id) DO NOTHING; INSERT INTO student (id, name, address, college_id) VALUES (1, 'Mark', 'Telegraph Ave', 1)...
<reponame>doanduyhai/centreon-injector INSERT INTO centreon.service_meta(service, id_metric) VALUES(${service1},${idMetric1}); INSERT INTO centreon.service_meta(service, id_metric) VALUES(${service1},${idMetric2}); INSERT INTO centreon.service_meta(service, id_metric) VALUES(${service2},${idMetric3});
CREATE TABLE role_entity ( role_uuid UUID PRIMARY KEY, -- DEFAULT random_uuid(), role VARCHAR2(255) NOT NULL, creation_date DATETIME NOT NULL DEFAULT now(), version INTEGER NOT NULL DEFAULT 1 ); ALTER TABLE user_entity ADD role_uuid UUID; ALTER TABLE user_entity ADD CONSTRAINT fk...
--变量: SET @SPARK_LABEL="spark-2.4.3"; SET @HIVE_LABEL="hive-1.2.1"; SET @PYTHON_LABEL="python-2"; SET @PIPELINE_LABEL="pipeline-*"; SET @JDBC_LABEL="jdbc-4"; --衍生变量: SET @SPARK_ALL=CONCAT('*-*,',@SPARK_LABEL); SET @SPARK_IDE=CONCAT('*-IDE,',@SPARK_LABEL); SET @SPARK_NODE=CONCAT('*-nodeexecution,',@SPARK_LABEL); SET ...
DROP FUNCTION IF EXISTS finance.get_frequency_start_date(_frequency_id integer, _value_date date); CREATE FUNCTION finance.get_frequency_start_date(_frequency_id integer, _value_date date) RETURNS date STABLE AS $$ DECLARE _start_date date; BEGIN SELECT MAX(value_date) INTO _start_date FROM finance.fr...
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/storage/crashrecovery/abort_create_needed_tests/trigger_sql/sql/abort_create_needed_co_reindex_btree_index_trigger.sql<gh_stars>1-10 begin; REINDEX INDEX abort_create_needed_cr_co_reindex_btree_idx1; drop index abort_create_needed_cr_co_reindex_btree_idx1; commit;
CREATE TABLE ACTIVITY ( ID decimal(12,2) NOT NULL, NAME varchar(200), TYPE varchar(200), DESCRIPTION_TEXT varchar(200), START_DATE timestamp, START_DATE_ORIG varchar(200), STOP_DATE timestamp, STOP_DATE_ORIG varchar(200), DURATION_VALUE decimal(12,2), DURATION_VALUE_ORIG varchar(200), DURATION_UN...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 29, 2018 at 03:45 AM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET FOREIGN_KEY_CHECKS=0; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+0...
<filename>projects/import-projects.sql .mode tabs .import "projects-cleaned.tsv" projects_temp .import "Department Name Cleanups - Sheet1.tsv" name_cleanups CREATE TABLE IF NOT EXISTS projects (project_name, email); INSERT INTO projects (project_name, email) SELECT trim("3"), trim("Faculty Email") FROM projec...
<filename>sql/initdb.sql drop database if exists metap; create database metap;
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.4 -- Dumped by pg_dump version 9.5.1 -- Started on 2016-10-22 18:53:45 CEST SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_mess...
<filename>public/db/tesis - copia/tesis_enfoquesplans.sql -- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: localhost Database: tesis -- ------------------------------------------------------ -- Server version 8.0.16 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @O...
<filename>database/stored procedures/get_userWithdrawals.sql<gh_stars>0 DROP PROCEDURE IF EXISTS get_userWithdrawals; DELIMITER $$ # CALL get_userWithdrawals(98); CREATE DEFINER=`root`@`localhost` PROCEDURE `get_userWithdrawals`(IN userId INT) BEGIN SELECT CONCAT('Php. ', CONVERT(COALESCE(w.w_amount, 0), DECIMAL(...
--Testing if the whole statements in the TRY will not be written if one fails --CONCLUSION: None were written --Implicit batch? --Testing if after one fails will the subesequent ones be excuted --PRINT 'Contuiing to Corret2 INSERT' is never excuted, hence none of the subsequent are executed\ BEGIN TRY I...
<reponame>mohsinrs/property -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 14, 2016 at 10:44 PM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
CREATE TABLE IF NOT EXISTS songs ( id UUID PRIMARY KEY DEFAULT uuid_generate_v4(), title TEXT, link TEXT, author TEXT, album TEXT );
<reponame>JhonChaparro/NOC_clientesEspeciales -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: on_air -- ------------------------------------------------------ -- Server version 5.5.5-10.1.25-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SE...
<reponame>Utdanningsdirektoratet/xmldataimport<filename>Udir.XmlDataImport.Test/SetupOracle.sql CREATE TABLE Persons ( ID numeric(10) GENERATED BY default on null as IDENTITY, LastName varchar2(255) NOT NULL, FirstName varchar2(255), Age numeric(10), CONSTRAINT ID_pk PRIMARY KEY (ID) ); CREATE TABLE Jobs ( ...
DROP VIEW IF EXISTS AllAthlete; DROP TABLE IF EXISTS Results; DROP TABLE IF EXISTS Bookings; DROP TABLE IF EXISTS Journey; DROP TABLE IF EXISTS Vehicle; DROP TABLE IF EXISTS OfficialEvent; DROP TABLE IF EXISTS TeamEvent; DROP TABLE IF EXISTS IndividualEvent; DROP TABLE IF EXISTS Event; DROP TABLE IF EXISTS Spo...
CREATE PROC [dbo].[uspPreferenceSetNegSelect] @PreferenceSetNegID UNIQUEIDENTIFIER AS SET NOCOUNT ON SET XACT_ABORT ON BEGIN TRAN SELECT [PreferenceSetNegID] ,[NegID] , [Percentage], [PreferenceSetID],[NegotiationName],[StatusID],[Deleted], [DeletedBy], [DeletedOn] FROM [dbo].[PreferenceSetNeg] WH...
<reponame>lgcarrier/AFW SET DEFINE OFF; CREATE UNIQUE INDEX AFW_01_MESG_LANG_PK ON AFW_01_MESG_LANG (SEQNC) LOGGING /
-- 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- -...
<gh_stars>1-10  /* HasFullColumnsInReferencing: Filter repo.IndexReferencedReferencing all columns, existing in referenced, should also exist in referencing in other words, the referenced index is completely contained in the referencing object keep in mind, that a [source_index_guid] can be inherited into several ...
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 27, 2018 at 07:53 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>Shuttl-Tech/antlr_psql -- file:plpgsql.sql ln:1854 expect:true select trap_foreign_key_2()
# clusterInputTrackTable.sql was originally generated by the autoSql program, which also # generated clusterInputTrackTable.c and clusterInputTrackTable.h. This creates the database representation of # an object which can be loaded and saved from RAM in a fairly # automatic way. #Some information on tracks used as ...
<reponame>flowsforapex/apex-flowsforapex PROMPT >> Add new configuration Keys for creating an APEX Session (Issue #444) begin insert into flow_configuration (cfig_key, cfig_value) values ('default_application', '100'); insert into flow_configuration (cfig_key, cfig_value) values ('default_pageid', '1'); ins...
<reponame>getdatakick/revws<gh_stars>10-100 /** * Copyright (C) 2017-2018 <NAME> <<EMAIL>> * * NOTICE OF LICENSE * * This source file is subject to the Academic Free License (AFL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://ope...
# Select ELT(1 + RAND() * 2, 'sport', 'nauka', 'inne'); # Select Round(RAND()); Call fill_out_random('hobby', 1300); Call get_all_hobbies(5); Insert Into hobby (osoba, id, typ) VALUES (6, 302, 'nauka'); Delete From sport Where id = 5; Update nauka Set nazwa = '***CHANGED***' WHERE id = 5; Call biggest_number_of...
-- Select the warehouse code and the average value of the boxes in each warehouse, but select only those warehouses where the average value of the boxes is greater than 150. select code, avg(value) from boxes where value>150 group by code;
/* Copyright (c) 2011 Massachusetts Institute of Technology * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy,...
-- @@@ 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...
-- ----------------------------------------------------- -- Table `custom_link_group` -- ----------------------------------------------------- CREATE SEQUENCE custom_link_group_seq; CREATE TABLE IF NOT EXISTS custom_link_group ( id BIGINT NOT NULL DEFAULT NEXTVAL ('custom_link_group_seq'), name VARCHAR(255) NOT N...
--Query to produce appendix 2: CPRD Additional Table Descriptions select count(*), a.enttype, e.category, e.description, e.data1 as data, e.data_fields, a.enttype||'-'||e.category||'-'||e.description||'-'||e.data1 as source_value from native.additional a j...
--use function as an argument --argument of string type select year(to_char(to_timestamp_tz('19:39:45 PM 12/12/2012 Europe/London'))); --argument of timestamp type select year(to_timestamp_tz('19:39:45 PM 12/12/2012 Europe/London')); --argument of datetime type select year(to_datetime_tz('01:23:33 am 10/23/1988 Eu...
-- pipeline target server/ db USE [widgets-database] GO SELECT * FROM sys.columns c JOIN sys.tables t ON t.object_id = c.object_id WHERE t.name = 'table2';
SELECT transaction_sets.id AS _id, transaction_sets.*, MAX(transactions_details_summary.transaction_time) AS max_time, MIN(transactions_details_summary.transaction_time) AS min_time, SUM(transactions_details_summary.tran_contribution_sum) AS tran_set_worth FROM tr...
<filename>tech.sql<gh_stars>0 -- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.8-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.0.0.5919 -- ------------------...
CREATE TYPE [dbo].[udtArtifact] AS TABLE ( [RequiredArtifactId] INT NOT NULL, [StudentId] INT NOT NULL, [Document] VARBINARY(MAX) NOT NULL, [CheckedOff] BIT NOT NULL )
DROP DATABASE IF EXISTS PvNoneDb; DROP DATABASE IF EXISTS PvTornPageDb; DROP DATABASE IF EXISTS PvCheckSumDb; CREATE DATABASE [PvNoneDb] CONTAINMENT = NONE ON PRIMARY ( NAME = N'PvNoneDb', FILENAME = N'/var/opt/mssql/data/PvNoneDb.mdf' , SIZE = 102400KB , FILEGROWTH = 102400KB ) LOG ON ( NAME = N'PvNoneDb_log', ...
/* this script is for portal db in cloud 2.0 */ use t17; select * from jos_dp_configuration where config_key="apps.public.assets.base.url"; update jos_dp_configuration set config_value = REPLACE(config_value,'palm.com','hpsvcs.com') where config_key="apps.public.assets.base.url";
<gh_stars>0 CREATE TABLE `users` ( `id` int(11) NOT NULL AUTO_INCREMENT, `login` varchar(30) NOT NULL DEFAULT '', `hashed_password` varchar(40) NOT NULL DEFAULT '', `firstname` varchar(30) NOT NULL DEFAULT '', `lastname` varchar(30) NOT NULL DEFAULT '', `mail` varchar(60) NOT NULL DEFAULT '', `mail_notifi...
<filename>Homework/DBFundamentals/Databases Basics/08.Database Programmability and Transactions/QueriesForSoftUniDatabase/Triggers and Transactions/p16.DepositMoney.sql CREATE PROCEDURE usp_DepositMoney(@AccountId INT, @MoneyAmount MONEY) AS BEGIN TRANSACTION UPDATE Accounts SET Balance += @MoneyAmount WHERE Id = @Acc...
CREATE TABLE [dbo].[WebConstant] ( [ConstantId] INT NOT NULL, [Value] NVARCHAR (256) NOT NULL, [Rank] INT NOT NULL, [Category] NVARCHAR (50) CONSTRAINT [DF__WebConsta__Category] DEFAULT ('') NOT NULL, [Text] NVARCHAR (256) NOT NULL, [ObjectId] INT ...
<reponame>AselaWD/CITITO SELECT * FROM ( SELECT TOP (999999999999999999) [TR_UID] AS [User ID] ,UH.P_Name AS [Employee Name] ,NULL AS [Resource ID] ,NULL AS [Res ID] ,NULL AS [P Type] ,NULL AS [DEPT] ,CONVERT(Date, TR.[TR_ActualTaskIn]) AS [Date] ,usr.P_Project AS [Project] ,NULL AS [New Assigne...
{{ config({ "schema": "sensitive" }) }} WITH qualtrics_mailing_contacts AS ( SELECT * FROM {{ ref('qualtrics_mailing_contacts') }} ), qualtrics_distribution AS ( SELECT * FROM {{ ref('qualtrics_distribution_xf') }} ), qualtrics_survey AS ( SELECT * FROM {{ ref('qualtrics_survey') }}...
<gh_stars>100-1000 -- fts3ao.test -- -- execsql { SELECT tbl_name FROM sqlite_master WHERE type = 'table'} SELECT tbl_name FROM sqlite_master WHERE type = 'table'
<gh_stars>0 insert into reserva (identificacionUsuario, nombreUsuario, fechaReserva, fechaCreacion, valorAPagar, idTipoHabitacion, idTipoUsuario) values (:identificacionUsuario, :nombreUsuario, :fechaReserva, :fechaCreacion, :valorAPagar, :idTipoHabitacion, :idTipoUsuario)
CREATE TABLE [tracked_deletes_lmsx].[Assignment] ( AssignmentIdentifier [NVARCHAR](255) NOT NULL, SchoolId [INT] NOT NULL, Id uniqueidentifier NOT NULL, ChangeVersion bigint NOT NULL, CONSTRAINT PK_Assignment PRIMARY KEY CLUSTERED (ChangeVersion) ) CREATE TABLE [tracked_deletes_lmsx]....
SELECT TO_CHAR (NVL ( (a.VALUE - b.VALUE + c.VALUE) * 100 / (a.VALUE), 0),'99.90') as Buffer_Cache_Hit_Rate FROM v$sysstat a, v$sysstat b, v$sysstat c WHERE a.name = 'session logical reads' AND b.name = 'physical reads' AND c.name = 'physical reads direct'
use esa; drop table if exists local_services; create table local_services ( local_service_id bigint NOT NULL, merchant_id bigint not null, parent_id bigint NULL, node_name varchar(255) not null, node_value varchar(1000) null, position integer null, workflow_id bigint not null, PRIMARY KEY(local_ser...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2017-11-16 14:11:17 -- 服务器版本: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET ...
<reponame>whatsgirl/backend-platform<gh_stars>1-10 INSERT INTO `MEMBER_LOGIN` (`MEMBER_ID`, `LOGIN_DATE`, `LOGIN_BOUNS`) VALUES (1, '2014-5-21 09:39:47', 1); INSERT INTO `MEMBER_LOGIN` (`MEMBER_ID`, `LOGIN_DATE`, `LOGIN_BOUNS`) VALUES (1, '2014-5-22 09:40:02', 2); INSERT INTO `MEMBER_LOGIN` (`MEMBER_ID`, `LOGIN_DATE`...
insert into form (id,formName) SELECT 1,'ancrv_1' WHERE NOT EXISTS (SELECT formName FROM form WHERE formName = 'ancrv_1'); insert into form (id,formName) SELECT 2,'ancrv_2' WHERE NOT EXISTS (SELECT formName FROM form WHERE formName = 'ancrv_2'); insert into form (id,formName) SELECT 3,'ancrv_3' WHERE NOT EXISTS (SELECT...
/****** Object: Table [dbo].[T_Reference_Compound] ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[T_Reference_Compound]( [Compound_ID] [int] IDENTITY(100,1) NOT NULL, [Compound_Name] [varchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL, [Description] [varchar](512) COLL...
create table video ( id int auto_increment comment '主键' primary key, title varchar(128) null comment '视频标题', alternate_name varchar(128) null comment '视频又名', cover varchar(1024) null ...
CREATE KEYSPACE IF NOT EXISTS killrvideo WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; use killrvideo; // Users keyed by id CREATE TABLE IF NOT EXISTS users ( userid uuid, firstname text, lastname text, email text, created_date timestamp, PRIMARY KEY...
-- Modify to meet your database specific format... -- Create Example Table (DDL) CREATE TABLE CARS ( VIN VARCHAR(50) PRIMARY KEY, BRAND VARCHAR(50), COLOR VARCHAR(50), YEAR NUMBER ); -- Insert Records (DML) INSERT INTO CARS (VIN, BRAND, COLOR, YEAR) VALUES ('a13242314', 'VW', 'RED', 2015); INSERT INTO CARS (VIN, BRAND...
<reponame>Eroschang/ranger -- 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.0 -- (...
CREATE TABLE `tb_xmvawoekwx` ( `col_gsqeppbqjg` set('enum_or_set_0','enum_or_set_1','enum_or_set_2') DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
<filename>src/test/tinc/tincrepo/mpp/gpdb/tests/security/kerberos/sql/distributed_transactions.sql -- @product_version gpdb: [4.3.2-4.3.98] -- -- DISTRIBUTED TRANSACTIONS -- --SET debug_print_full_dtm=true; -- -- start_matchsubs -- -- # create a match/subs expression -- -- m/(ERROR|WARNING|CONTEXT|NOTICE):.*The previo...
<reponame>EIDSS/EIDSS-Legacy -- ============================================= -- Author: <NAME>. -- Create date: 25.06.2013 -- Description: returns id of latest query cache record -- ============================================= /* --Example of procedure call: exec spAsQueryCacheExist 49539640000000, 'en' ...
<gh_stars>10-100 CREATE OR REPLACE VIEW railroad_z5 AS ( SELECT geom FROM ne_10m_railroads WHERE scalerank <= 5 ); CREATE OR REPLACE VIEW railroad_z6 AS ( SELECT geom FROM ne_10m_railroads WHERE scalerank <= 6 ); CREATE OR REPLACE VIEW railroad_z7 AS ( SELECT geom FROM ne_10m_railroads...
<filename>medium/_05_err_x/cases/alter38.sql autocommit off; create vclass foo_c (attr_name string default '10') method fun(string) float; alter vclass foo_c rename method attr_name as fun; rollback work; rollback;
create table Request.Supplies ( RequestID int not null primary key foreign key references Request.Request(RequestID) ,Soap bit not null ,PaperTowels bit not null ,TrashBags bit not null ,Sponges bit not null ,Content nvarchar(500) ,Active bit not null default(1) )
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 10, 2022 at 08:51 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 8.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
DROP DATABASE IF EXISTS employee_Tracker; CREATE DATABASE employee_Tracker; USE employee_Tracker; CREATE TABLE department ( dept_id INTEGER AUTO_INCREMENT NOT NULL, dept_name varchar(30) NOT NULL, PRIMARY KEY (dept_id) ); CREATE TABLE emp_role ( role_id INTEGER AUTO_INCREMENT NOT NULL, title VARCHAR(30) ...
<gh_stars>0 DELETE FROM password_reset WHERE id = $1;
<reponame>mloibner/EmployeeTrackerMySQL DROP DATABASE IF EXISTS employee_db; CREATE DATABASE employee_db; USE employee_db; CREATE TABLE department ( id INT NOT NULL, name VARCHAR(30) NOT NULL, PRIMARY KEY (id) ); CREATE TABLE role ( id INT NOT NULL, title VARCHAR(30) NOT NULL, salary DECIMAL(7) NULL, ...
-- phpMyAdmin SQL Dump -- version 3.5.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 09, 2015 at 06:01 AM -- Server version: 5.5.24-log -- PHP Version: 5.3.13 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 03, 2020 at 04:37 AM -- Server version: 10.4.13-MariaDB -- PHP Version: 7.4.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...