sql
stringlengths
6
1.05M
-- Initialization create package test_plsqltables as type string_tab is table of varchar2(50) index by binary_integer; procedure combine_values(value1 in string_tab, value2 in string_tab, result out string_tab); end; / create package body test_plsqltables as procedure combine_values(value1 in string_tab, ...
-- -- Table structure for table `pesapal_txn` -- CREATE TABLE `pesapal_txn` ( `txn_id` bigint(40) NOT NULL, `reference_code` bigint(40) NOT NULL, `tracking_id` varchar(5000) COLLATE utf8_unicode_ci NOT NULL, `txn_date` datetime NOT NULL, `txn_ipn_date` datetime NOT NULL, `notification_type` varchar(50) CO...
IMPORT FROM CSV FILE 'src/test/resources/joins/2_a.csv' INTO a(A0 string, A1 string); IMPORT FROM CSV FILE 'src/test/resources/joins/2_b.csv' INTO b(A1 string, A2 string); SELECT * FROM a JOIN b USING (A1) ORDER BY A1;
create table coo( col1 char(30), col2 char(30) ); insert into coo values('-8237923123', '123242347439281078412122'); alter table coo change col1 col1 bigint; select col1 from coo; alter table coo change col2 col2 bigint; select col2 from coo; drop table coo;
SELECT year, AVG(close - open) AS avg_daily_change FROM tutorial.aapl_historical_stock_price GROUP BY year ORDER BY year;
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 02, 2016 at 03:10 PM -- Server version: 10.1.13-MariaDB -- PHP Version: 7.0.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
<reponame>edigonzales/nplso-validator -- Create additional DB users CREATE USER :PG_WRITE_USER WITH PASSWORD :'<PASSWORD>'; CREATE USER :PG_READ_USER WITH PASSWORD :'<PASSWORD>'; -- Revoke some default privileges REVOKE TEMPORARY ON DATABASE :PG_DATABASE FROM PUBLIC; REVOKE CREATE ON SCHEMA public FROM PUBLIC;
<filename>Portal/Server/Head/src/Service/DataAccessLayer/UpgradeScripts/0058.sql<gh_stars>0 CREATE VIEW [dbo].[LastQAApprovedVersionForEachGame] AS SELECT dbo.GameVersion.Game_ID, dbo.GameVersion.Technology, dbo.GameVersion.PlatformType, MAX(dbo.GameVersion.VersionAsLong) AS LatestQAAp...
<gh_stars>0 ALTER TABLE eg_checklist DROP CONSTRAINT fk_eg_checklist_crtby; ALTER TABLE eg_checklist DROP CONSTRAINT fk_eg_checklist_mdfdby; ALTER TABLE eg_checklist_type DROP CONSTRAINT fk_eg_mstr_checklist_type_crtby; ALTER TABLE eg_checklist_type DROP CONSTRAINT fk_eg_mstr_checklist_type_mdfdby; ALTER TABLE eg_o...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Nov 02, 2018 at 11:20 PM -- Server version: 5.7.24-0ubuntu0.16.04.1 -- PHP Version: 7.0.32-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40...
<reponame>sanket0211/e-commerce-website -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 18, 2016 at 10:56 AM -- Server version: 5.5.46-0ubuntu0.14.04.2 -- PHP Version: 5.5.9-1ubuntu4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:...
<reponame>khandy21yo/aplus DEFINE RECORD CDD$TOP.MO.MO_MAKESIZE DESCRIPTION IS /*Make Size Description Table*/. MO_MAKESIZE_CDD STRUCTURE. /* Element = Description = Make Size Code */ MSIZE DATATYPE IS TEXT SIZE IS 4. /* Element = Description...
<filename>Database/Stored Procedures/ResetKD.sql<gh_stars>1-10 /****** Object: Stored Procedure dbo.ResetKD Script Date: 5/1/2004 6:12:38 PM ******/ CREATE PROCEDURE dbo.ResetKD ( @kdID int ) AS UPDATE AccountStatus SET Dead = 0, Newbie = 1, NewbieHours = 72 WHERE kdID = @kdID UPDATE Buildings SET Bui...
CREATE FUNCTION ufn_IsWordComprised(@setOfLetters VARCHAR(MAX), @word VARCHAR(MAX)) RETURNS TINYINT AS BEGIN DECLARE @result TINYINT = 1; DECLARE @length INT = LEN(@word); DECLARE @index INT = 1; DECLARE @char CHAR = 1; WHILE @index <= @length BEGIN SET @char = SUBSTRING(@word, @index, 1) IF (CHARINDEX(@char, @setOfL...
-- MySQL dump 10.13 Distrib 8.0.28, for Win64 (x86_64) -- -- Host: localhost Database: nhl363 -- ------------------------------------------------------ -- Server version 8.0.28 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4...
<gh_stars>1000+ create or replace function uomConvert ( p_M_Product_ID numeric , p_C_UOM_From_ID numeric , p_C_UOM_To_ID numeric , p_Qty numeric ) returns numeric as $BODY$ declare v_Product_UOM_ID numeric; v_Precision numeric; v_QtyConv numeric; begin -- Try converting using the direct conversion (if exists) ...
<reponame>Ambal/mangos<gh_stars>1-10 ALTER TABLE db_version CHANGE COLUMN required_7149_01_mangos_spell_proc_event required_7150_01_mangos_playercreateinfo_spell bit; DELETE FROM `playercreateinfo_spell` WHERE Spell = 58284; INSERT INTO `playercreateinfo_spell` VALUES (1,9,58284,'Chaos Bolt Passive'), (2,9,58284,'Cha...
CREATE TABLE value_stats ( variablename character(200), invaliddates character(100), maxlength double precision, averagelength double precision, missingvalues double precision, uniquecount double precision, frequency double precision, percentage double precision, tablename character(250) ) WITH ( O...
<gh_stars>1000+ # Time: O(n) # Space: O(n) SELECT Date_format(trans_date, '%Y-%m') AS month, country, Count(id) AS trans_count, Count(IF(state = 'approved', 1, NULL)) AS approved_count, SUM(amount) AS trans_total_amount, ...
-- Database structure for photos CREATE DATABASE IF NOT EXISTS `photos` /*!40100 DEFAULT CHARACTER SET utf8mb4 */; USE `photos`; -- Structure for table photos.photo CREATE TABLE IF NOT EXISTS `photo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `filename` varchar(250) NOT NULL DEFAULT '0', `description` varchar(2500)...
<gh_stars>0 # Users schema # --- !Ups CREATE TABLE User ( name VARCHAR(255), password VARCHAR(255), otpKey VARCHAR(511), PRIMARY KEY (name) ); # --- !Downs DROP TABLE User;
<gh_stars>10-100 //// CHANGE name=change0 CREATE MEMORY TABLE TABLE220(ID INTEGER NOT NULL PRIMARY KEY,FIELD1 VARCHAR(30),USERTYPE4FIELD USERTYPE4,USERTYPE2FIELD USERTYPE2,USERTYPE8FIELD USERTYPE8) GO
select title, akas from gcp.gcp_monitoring_alert_policy where name = 'dummy';
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 25, 2021 at 08:55 PM -- Server version: 10.4.19-MariaDB -- PHP Version: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- phpMyAdmin SQL Dump -- version home.pl -- http://www.phpmyadmin.net -- -- Host: localhost -- Czas wygenerowania: 29 Paź 2018, 19:16 -- Wersja serwera: 5.7.22-22-log -- Wersja PHP: 7.1.15 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *...
<reponame>giacomominello/EPOOL<filename>sql/storicoPrenotazione.sql CREATE VIEW STORICO_PRENOTAZIONI(ID, INIZIO, FINE, NOTE, AUTO, UTENTE, INDIRIZZO_PARTENZA, INDIRIZZO_ARRIVO) as SELECT ID, INIZIO, FINE, NOTE, AUTO, UTENTE, INDIRIZZO_PARTENZA, INDIRIZZO_ARRIVO FROM PRENOTAZIONE;
<reponame>kysley/walljoy-server<filename>prisma/migrations/20210622041920_g/migration.sql /* Warnings: - The primary key for the `Collection` table will be changed. If it partially fails, the table could be left without primary key constraint. - The `id` column on the `Collection` table would be dropped and recr...
<filename>backend/prisma/migrations/20210629000514_id_to_uuid/migration.sql<gh_stars>0 /* Warnings: - The primary key for the `Customer` table will be changed. If it partially fails, the table could be left without primary key constraint. - The primary key for the `CustomerPhoneNumber` table will be changed. If ...
/* Soal no 5 | <NAME> */ SELECT * FROM mahasiswa WHERE nama LIKE "I%";
<filename>tc-config/rds/02_insert_regions.sql INSERT INTO tc.dd_region (id, parent_id, name, updated_person, updated_timestamp, created_person, created_timestamp) VALUES ('P11', 'CHN', '北京市', '00000000000000000000000000000000', '2016-12-12 12:12:12.000', '00000000000000000000000000000000', '2016-12-12 12:12:12.000'); I...
CREATE DATABASE IF NOT EXISTS `gringotts` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `gringotts`; CREATE TABLE IF NOT EXISTS `wizzard_deposits` ( `id` int(10) PRIMARY KEY, `first_name` varchar(50), `last_name` varchar(60), `notes` text, `age` int(10), `magic_wand_creator` varchar(100), `magi...
<filename>browser-back-incident/reports.sql -- reportsテーブルの定義 -- CREATE TABLE `reports` (   `reportid` varchar(16) NOT NULL,   `userid` varchar(10) NOT NULL,   `filename` varchar(32) NOT NULL,  PRIMARY KEY (`reportid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `reports` (`reportid`, `userid`, `filename`) ...
<reponame>SushilShrestha/NOC -- MySQL Script generated by MySQL Workbench -- शनिबार 21 नवम्बर 2015 11:58:39 पूर्वाह्न NPT -- 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_CH...
<filename>processapplication/src/main/resources/data.sql INSERT INTO RFC(R_ID, R_TITLE, R_DESCRIPTION, R_REASONS, R_STATE) VALUES (1, 'Moodle-Kompatibilität mit Opera Mobile', 'Moodle sollte auch auf der aktuellen Opera Mobile-Version 8.5 korrekt angezeigt werden.', 'Das Hamburger-Menü wird nicht mehr angezeigt.', 'Gep...
DROP VIEW IF EXISTS `bookazon`.`booksSold` ; CREATE VIEW `booksSold` AS select title as bookTitle, cat.category, auth.Name as Author, format, b2.yr, b2.totalSales, b2.totalUnits from books AS b1 INNER JOIN ( SELECT c.id, c.category from Categories c) as cat ON b1.category = cat.id INNER JOIN ( SELECT a.id, a.Name fro...
CREATE SEQUENCE seq_pst_id INCREMENT 1 START 1; CREATE TABLE preset_states ( pst_name VARCHAR(128), pst_last_managed TIMESTAMP WITH TIME ZONE DEFAULT NULL, pst_last_managed_by VARCHAR(64), pst_is_locked BOOLEAN NOT NULL DEFAULT FALSE, pst_vms_states ...
-- +++ -- parent: 1528395936 -- +++ BEGIN; -- Begin cm_webhooks CREATE TABLE IF NOT EXISTS cm_webhooks ( id BIGSERIAL PRIMARY KEY, monitor BIGINT NOT NULL REFERENCES cm_monitors(id) ON DELETE CASCADE, url TEXT NOT NULL, enabled BOOLEAN NOT NULL, created_by INTEGER NOT NULL REFERENCES users(id) ON DELETE CASCADE,...
/* Reset IsScanFinished flag for incorrect ImageCache Url*/ Update MangaChapters Set IsScanFinished=0 where Id in ( SELECT distinct HomeChapter_Id FROM ImageCaches WHERE (Url LIKE '%BlueWind.Crawler.Manga.ImageCache%')) DELETE FROM ImageCaches WHERE (Url LIKE '%BlueWind.Crawler.Manga.I...
<filename>tpc-ds/transformed/query33.sql SELECT i_manufact_id ,SUM(total_sales) total_sales FROM ( SELECT * FROM ( SELECT i_manufact_id ,SUM(ss_ext_sales_price) total_sales FROM store_sales JOIN date_dim JOIN customer_address JOIN item ON i_manufact_id = item.i_manufact_id WHERE ss_item_sk ...
/* * Copyright (c) 2004-2019, University of Oslo * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this * list o...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50553 Source Host : localhost:3306 Source Database : zmzfang Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2017-03-17 18:33:20 */ SET FOREIGN_KEY_CHECKS=0; -- -...
<gh_stars>1-10 /* this query will load random data into: - stac_api_collection (10 collections) - stac_api_item (500'000 items / collection) you can set the number of collections and the number of items for each collection. see inline comments */ begin; TRUNCATE TABLE stac_api_collection CASCADE; -- loa...
ALTER TABLE Users ADD CONSTRAINT DF_LastLoginTime DEFAULT GETDATE() FOR LastLoginTime INSERT INTO Users(Username, [Password], ProfilePicture, IsDeleted) VALUES ('someuser', '<PASSWORD>', NULL, 1) SELECT * FROM Users
<reponame>Kresten/udemycourses -- Create a table to organize our potential leads! We will have the following information: -- A customer's first name, last name,email,sign-up date, and number of minutes spent on the dvd rental site. -- You should also have some sort of id tracker for them. CREATE TABLE leads( cus...
IF OBJECT_ID('API.PersonLogin', 'P') IS NOT NULL BEGIN DROP PROC API.PersonLogin END GO SET ANSI_NULLS ON SET QUOTED_IDENTIFIER ON GO --------- Framework "Record" (R.Valiullin mailto:<EMAIL>) --------- CREATE PROC API.PersonLogin @Identifier nvarchar(4000) ,@PersonID bigint = NULL OUTPUT AS BEGIN SET NO...
-- Table: public.m_bike -- DROP TABLE public.m_bike; CREATE TABLE public.m_bike ( bike_id character varying(20) COLLATE pg_catalog."default" NOT NULL, name character varying(128) COLLATE pg_catalog."default", color character varying(128) COLLATE pg_catalog."default", model character varying(128) COLLA...
<filename>001-hello-world/sql/experiment.sql CREATE EXTENSION experiment; SELECT experiment_hello(); DROP EXTENSION experiment;
<filename>Rock_in_Rio/Codigo(SQL)/roles.sql --REVOKE ALL ON DATABASE rock_in_rio FROM organizador,plateia; REVOKE ALL ON SCHEMA Palcos FROM organizador,plateia; REVOKE ALL ON SEQUENCE Palco_cod_seq,Banda_cod_seq FROM organizador,plateia; DROP ROLE jose,joao; DROP ROLE organizador,plateia; --DROP DATABASE rock_in_rio c...
CREATE TABLE [dbo].[CategoryTranslation] ( [CategoryTranslationId] INT IDENTITY (1, 1) NOT NULL , [CategoryId] INT NULL, [Label] VARCHAR(4000) NULL, [Locale] VARCHAR(5) NULL, CONSTRAINT [FK_CategoryTranslation_Category] FOREIGN KEY ([CategoryId]) REFERENCES [Category]([CategoryId]), CONSTRAINT [PK...
<filename>private/database/tables/structure/dlayer_module.sql CREATE TABLE `dlayer_module` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(25) COLLATE utf8_unicode_ci NOT NULL, `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `description` text COLLATE utf8_unicode_ci NOT NULL, `sort_ord...
<reponame>nelemans1971/Discogs USE <%DATABASE%>; DROP TABLE IF EXISTS SETTING; DROP TABLE IF EXISTS ARTIST; DROP TABLE IF EXISTS NAMEVARIATION; DROP TABLE IF EXISTS ALIAS; DROP TABLE IF EXISTS MEMBER; DROP TABLE IF EXISTS `GROUP`; DROP TABLE IF EXISTS URL; DROP TABLE IF EXISTS IMAGE; DROP TABLE IF EXISTS LABEL; DROP T...
<filename>oracle/ora/scn.sql /*[[ Show SCN information or compute the time range for a specific SCN. Usage: @@NAME <inst_id>|0|<scn> Sample Output: ============== SCN/Sec SCN/Sec SCN/Sec SCN/Sec Head Room DBID...
<gh_stars>1-10 -- -- MODES -- -- DROP VIEW IF EXISTS mode_scale_chord_relation_view; DROP VIEW IF EXISTS chord_view; DROP VIEW IF EXISTS chord_note_view; DROP VIEW IF EXISTS mode_chord_view; DROP VIEW IF EXISTS mode_chord_note_view; DROP VIEW IF EXISTS mode_view; DROP VIEW IF EXISTS mode_note_view; --...
create materialized view notes_skus_view as select n.id, -- SKU case when count(s) = 0 then null else to_json(( f.id, s.code, f.attributes, to_char(s.created_at, 'YYYY-MM-DD"T"HH24:MI:SS.MS"Z"') )::export_skus_raw) end as sk...
<filename>lesson-10/lesson-10.sql -- 1. Проанализировать какие запросы могут выполняться наиболее часто в процессе работы приложения -- и добавить необходимые индексы. -- (а. Чтобы не повторяться: если базе 'vk' в таблице есть поле 'id', то индекс по нему уже есть.) -- (б. Все добавленные в рамках этого п.з. индексы ...
INSERT INTO tb_autor (created_At,nome, email, descricao) VALUES (NOW(), 'Cristina', '<EMAIL>', 'fazendo comentários'); INSERT INTO tb_categoria (nome) VALUES ('Eletronicos'); INSERT INTO tb_livro (titulo,resumo,sumario,preco,numero_de_paginas,isbn,data_publicacao, autor_id, categoria_id) VALUES ('Clean Code', 'Não pr...
CREATE KEYSPACE IF NOT EXISTS usde WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 3 }; DROP TABLE IF EXISTS usde.tweet; DROP TABLE IF EXISTS usde.user; DROP TABLE IF EXISTS usde.engagement; CREATE TABLE usde.user ( id TEXT, verified BOOLEAN, PRIMARY KEY (id) ); CREATE TABLE usde....
<gh_stars>1-10 -- -- A hint submitted by a user: Oracle DB MUST be created as "shared" and the -- job_queue_processes parameter must be greater than 2, otherwise a DB lock -- will happen. However, these settings are pretty much standard after any -- Oracle install, so most users need not worry about this. -- dele...
-- @testpoint: opengauss关键字transactions_committed(非保留),作为函数名,部分测试点合理报错 --关键字不带引号-成功 drop function if exists transactions_committed; create function transactions_committed(i integer) returns integer as $$ begin return i+1; end; $$ language plpgsql; / drop function if exists transactions_committed; --关键字带双引号-成功 drop...
<gh_stars>0 SELECT * FROM KNOWLEDGE_TAGS WHERE KNOWLEDGE_ID = ? ; ;
<filename>ARCHIVO DE BASE DE DATOS/INARTECT_.sql /*crear el usuario*/ alter session set "_ORACLE_SCRIPT"=true; CREATE USER INARTECT_ IDENTIFIED BY Pa55w0rd DEFAULT TABLESPACE INARTECT_ TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON INARTECT_; GRANT ALL PRIVILEGES TO INARTECT_; /*se asignaron to...
Insert into EG_ACTION ("id","name","url","queryparams","parentmodule","ordernumber","displayname","enabled","contextroot","version","createdby","createddate","lastmodifiedby","lastmodifieddate","application") values (nextval('seq_eg_action'),'CancelChallanReceipt','/receipts/challan-cancelReceipt.action',null,(select I...
UPDATE cars SET `condition` = 'C' WHERE (mileage >= 800000 OR mileage IS NULL) AND `year` <= 2010 AND make != 'Mercedes-Benz'
ALTER TABLE fleet ADD COLUMN corporation_id BIGINT NULL;
<filename>postgresql/sql/show_dependent_views.sql -- show table's dependent views (DROP VIEW -> ALTER TABLE -> CREATE VIEW) -- don't forget edit WHERE conditions SELECT dependent_ns.nspname as dependent_schema , dependent_view.relname as dependent_view , source_ns.nspname as source_schema , source_table.relname as sou...
-- EMAIL TEMPLATES INSERT INTO `sys_email_templates` (`Module`, `NameSystem`, `Name`, `Subject`, `Body`) VALUES ('bx_api', '_bx_api_et_txt_name_password_reset', 'bx_api_password_reset', '_bx_api_et_txt_subject_password_reset', '_bx_api_et_txt_body_password_reset');
<filename>CSDGAN/utils/schema.sql<gh_stars>1-10 SET FOREIGN_KEY_CHECKS=0; drop table IF EXISTS user, run, status, status_info; SET FOREIGN_KEY_CHECKS=1; create TABLE user ( id INTEGER PRIMARY KEY AUTO_INCREMENT, username VARCHAR(20) UNIQUE NOT NULL, password VARCHAR(100) NOT NULL, last_login TIMESTAMP NOT NULL...
<reponame>blockchain-etl/iotex-etl<filename>sqls/number_of_funded_accounts_over_time.sql #standardSQL -- Read this article to understand this query https://medium.com/google-cloud/plotting-ethereum-address-growth-chart-55cc0e7207b2 WITH double_entry_book as ( -- transaction logs debits SELECT timestamp, recipie...
<filename>src/EphIt/Classlibraries/EphIt.Db/SQL/Trigger/TR_Role_Audit_Update.sql CREATE OR ALTER TRIGGER dbo.TR_Role_Audit_Update ON [Role] AFTER UPDATE AS BEGIN INSERT INTO [AUDIT] ( RbacActionId, RbacObjectId, Created, UserId, ObjectId ) SELECT CASE WHEN INSERTED.IsDeleted = 1 THEN 3 ELSE 4 END AS 'RbacAc...
-- -- PostgreSQL database dump -- 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_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgsq...
CREATE USER ODI_USER IDENTIFIED BY <ENTER_PASSWORD_HERE>; GRANT CREATE SESSION TO ODI_USER; GRANT DWROLE TO ODI_USER; GRANT SELECT ANY TABLE to ODI_USER; GRANT INSERT ANY TABLE to ODI_USER; GRANT UPDATE ANY TABLE to ODI_USER; CREATE TABLE ODI_USER.DATE_DIM ( DT_DIM_ID NUMBER, DT DATE, DAY_NAME VARCHAR2(3...
<gh_stars>0 UPDATE dbo.Utilisateur SET Uti_Adresse='', Uti_CompAdresse=:Uti_CompAdresse, Uti_Cp=:Uti_Cp, Uti_Ville=:Uti_Ville, Uti_Pays=:Uti_Pays, Uti_TelContact=:Uti_TelContact, Uti_Mdp=:Uti_Mdp, Uti_MailContact=:Uti_MailContact WHERE Uti_Id=$_SESSION['user_id'] or (Uti_Id=1 AND Uti_Cli_Id=
/*******************************************************************************************/ -- Script: MergeTables.sql -- Author: <NAME> -- Date: October 18, 2019 /*******************************************************************************************/ USE CHDB; /**************************************...
<filename>EdFi.Ods.Utilities.Migration/Scripts/MsSql/02Upgrade/v25_to_v31/11 Create Constraints/41440 ParentAddress [PK, IX, D].sql -- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0...
INSERT INTO `ms_shicai_category` (`category_id`, `parent_id`, `category_name`, `create_time`, `update_time`) VALUES (1, 0, '猪肉', '2018-8-29 22:18:31', '2018-8-29 22:18:31'); INSERT INTO `ms_shicai_category` (`category_id`, `parent_id`, `category_name`, `create_time`, `update_time`) VALUES (2, 1, '猪肉', '2018-8-29 22:18...
<gh_stars>100-1000 -- @@@ 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...
-- MySQL dump 10.13 Distrib 5.5.34, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: systemlog -- ------------------------------------------------------ -- Server version 5.5.34-0ubuntu0.13.10.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@...
SPOOL service_trigger.log COL service_rw NOPRINT NEW_VALUE service_rw COL service_ro NOPRINT NEW_VALUE service_ro SELECT rtrim(sys_context('userenv','con_name') ||'_RW.'|| a.value,'.') service_rw FROM v$parameter a WHERE a.name = 'db_domain' ; SELECT rtrim(sys_context('userenv','con_name') ||'_RO.'|| a.value,'.') se...
<reponame>jackc/sqlfmt-deb<filename>testdata/select_star.fmt.sql select * from baz
<filename>hehecms.sql # Host: 127.0.0.1 (Version: 5.5.53) # Date: 2018-12-14 17:27:51 # Generator: MySQL-Front 5.3 (Build 4.234) /*!40101 SET NAMES utf8 */; # # Structure for table "he_admin" # DROP TABLE IF EXISTS `he_admin`; CREATE TABLE `he_admin` ( `id` int(11) NOT NULL AUTO_INCREMENT, `usernam...
<gh_stars>0 -- @testpoint: opengauss关键字returned_sqlstate(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists returned_sqlstate_test; create table returned_sqlstate_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists returned_sqlstate; create synonym returned_sqlstate for returned_sqlstate_test; insert i...
<reponame>lol768/tabula<filename>config/scripts/schema/migrations/2014-08-07 - add default properties for small group events to sets.sql -- TAB-2541 alter table SmallGroupSet add ( default_weekRanges nvarchar2(255), default_tutorsGroup_id nvarchar2(255), default_location nvarchar2(255) );
<filename>src/main/resources/db/migration/R__Repeatable.sql -- sql repeatable migration example show schemas; show tables from PUBLIC;
<reponame>geophile/sql-layer<gh_stars>0 SELECT a_int FROM types WHERE a_uint = 100
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 05, 2020 at 01:47 PM -- 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...
/* Navicat Premium Data Transfer Source Server : SA Source Server Type : MySQL Source Server Version : 100414 Source Host : localhost:3306 Source Schema : marathon-quiz-tb Target Server Type : MySQL Target Server Version : 100414 File Encoding : 65001 Date: 14/11/202...
<filename>sql/create_worker_table.sql<gh_stars>10-100 CREATE TABLE Worker ( WorkerID INTEGER NOT NULL, Capacity INTEGER NOT NULL, DataShards Integer NOT NULL, PKey INTEGER NOT NULL, Url VARCHAR(512) ); PARTITION TABLE Worker ON COLUMN PKey; CREATE INDEX workerIDIndex ON Worker (workerID); CREATE IND...
<filename>schema/relevance.sql CREATE TABLE relevance ( id SERIAL PRIMARY KEY, object VARCHAR(256) NOT NULL, height integer NOT NULL, rank numeric NOT NULL ); CREATE UNIQUE INDEX relevance_cid_block ON relevance(object, height);
DROP DATABASE IF EXISTS hrDB; CREATE DATABASE hrDB; USE hrDB; CREATE TABLE department ( id INT PRIMARY KEY AUTO_INCREMENT, name VARCHAR(100) NULL ); CREATE TABLE role ( id INT PRIMARY KEY AUTO_INCREMENT, title VARCHAR(30), salary DECIMAL, department_id INT, FOREIGN KEY (department_id) RE...
<filename>CQS.Database/dbo/Tables/Client.sql CREATE TABLE [dbo].[Client] ( [Id] INT IDENTITY (1, 1) NOT NULL, [Name] NVARCHAR (512) NOT NULL, [TaxId] NVARCHAR (128) NOT NULL, PRIMARY KEY CLUSTERED ([Id] ASC) );
CREATE EXTENSION IF NOT EXISTS pgcrypto; BEGIN; DROP VIEW IF EXISTS "RunView"; DROP VIEW IF EXISTS "AggregatedLumisection"; DROP AGGREGATE IF EXISTS oms_attributes (jsonb); DROP AGGREGATE IF EXISTS rr_attributes (jsonb); DROP AGGREGATE IF EXISTS mergejsonb (jsonb); DROP AGGREGATE IF EXISTS mergejsonbarray (...
<filename>src/test/resources/bvt/parser/antlr_grammers_v4_plsql/examples/datetime04.sql<gh_stars>100-1000 select timestamp '2009-10-29 01:30:00' from dual
CREATE TABLE IF NOT EXISTS company ( id CHAR(27) NOT NULL UNIQUE, name VARCHAR(255) NOT NULL, url VARCHAR(255) NOT NULL, locations VARCHAR(255) NOT NULL, last_job_created_at TIMESTAMP NOT NULL, icon_image_id CHAR(27) NOT NULL, total_job_count INT NOT NULL, active_job_count INT NOT NULL, PRIMARY KEY(id...
DELETE FROM soup WHERE id = 5;
insert into users values(1, 'Costel', 'costelcroitoru', '123456', 'ADMIN'); insert into news values (1, 'News title', 'news description', 'http://localhost:8080/test'); insert into evaluation values (1, 1, 1, 0, parsedatetime('10-01-2018 18:47:52.69', 'dd-MM-yyyy hh:mm:ss.SS'), parsedatetime('01-01-2018 18:50:52....
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 23, 2020 at 09:27 AM -- Server version: 10.1.32-MariaDB -- PHP Version: 7.2.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
<reponame>Modern-Knowledge/serious-game-backend CREATE TABLE IF NOT EXISTS `games` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(45) NOT NULL, `description` VARCHAR(45) NOT NULL, `component` VARCHAR(45) NULL, `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP...
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3308 -- Generation Time: Jun 04, 2020 at 02:33 PM -- Server version: 8.0.18 -- PHP Version: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
/*Obtener el título, costo de renta, nombre de categoría y número de copia de los videos disponibles en el sistema.*/ SELECT VideoCopy.VideoNo, Video_Category.CategoryName, Video.Title, Video.DailyRental FROM VideoCopy,Video, Video_Category WHERE Video.CatalogNo = VideoCopy.CatalogNo AND Video.CatalogNo = Video_Catego...
select left(s.producer_estab_code, 7) as municipality_code, sum(s.animals) as animals from sales as s inner join traders as t on left(s.buyer_cpf_cnpj, 8) = t.base_cnpj and left(s.producer_cpf_cnpj, 8) != t.base_cnpj where s.issue_date between '2017-01-01'::date and '2019-12-31'::date and s.species ...