sql
stringlengths
6
1.05M
<gh_stars>0 /* leave this l:see LICENSE file g:utility v:090609\S.Zaglio: adapted to sqlce v:061226\S.Zaglio: get like expression on keys pressed t:print dbo.fn__t9('cod','.1234567890') */ CREATE function [dbo].[fn__t9](@fld sysname, @t9 nvarchar(32)) returns nvarchar(4000) as begin /* select ...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Apr 05, 2021 at 12:06 PM -- Server version: 5.7.31 -- PHP Version: 7.3.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@...
<filename>Query/14-Securing Databases/14.6 granting privileges.sql -- 14.6 granting privileges -- 1st senerio web application with only read and write create user moon_app identified by "<PASSWORD>"; grant select, insert, update, delete, execute on sql_store.* -- all tables in database to moon_app; -- can also mensio...
<gh_stars>0 CREATE TABLE `user_types` ( `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, `user_type` VARCHAR DEFAULT 'user', `type_desc` VARCHAR DEFAULT 'Default User' ); INSERT INTO user_types (id, user_type, type_desc) VALUES (1, 'user', 'Common User'); INSERT INTO user_types (id, user_type, type_desc) VALUES ...
<filename>yaml/db/explore.sql<gh_stars>0 DROP DATABASE IF EXISTS `explore`; CREATE DATABASE `explore` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; GRANT ALL PRIVILEGES ON explore.* TO 'root'@'localhost'; FLUSH PRIVILEGES; USE `explore`; CREATE TABLE IF NOT EXISTS `transaction` ( `tx_index` BIGINT UNSIGNED...
<filename>data/open-source/extracted_sql/ufal_lindat-repository.sql SELECT item_id, dc_type_id, text_value, text_lang, place FROM dcvalue; SELECT * FROM resourcepolicy WHERE resource_type_id= ? CREATE INDEX com2com_parent_fk_idx ON Community2Community(parent_comm_id); insert into checksum_resultsvalues( 'BITSTREAM_MAR...
<filename>sql/bd3.sql -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Nov 22, 2019 at 02:47 AM -- Server version: 5.7.26 -- PHP Version: 7.2.18 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
<filename>Information Center/MAIN[.Net4.6.1]/DB/ICSQL/MSSQL/IC.DB.ICSQL.MSSQL.SQLScripts/SQLUpdate/00001.sql /* =============================================================== ITEra functionality ----------------------- Add creating stored procedures 2018/01/31, Created, VTyagunov */ USE [ICDB] G...
CREATE TABLE Logs ( LogId INT PRIMARY KEY IDENTITY, AccountId INT NOT NULL, OldSum DECIMAL(18,4), NewSum DECIMAL(18,4) ) CREATE TRIGGER tr_AccountChanges ON Accounts FOR UPDATE AS DECLARE @newSum DECIMAL(18,2) = (SELECT Balance FROM inserted) DECLARE @oldSum DECIMAL(18,2) = (SELECT Balance FROM deleted) DECLARE @ac...
-- AlterTable ALTER TABLE `users` ADD COLUMN `token` VARCHAR(191); -- CreateTable CREATE TABLE `verifications` ( `id` INTEGER NOT NULL AUTO_INCREMENT, `code` VARCHAR(191) NOT NULL, `token` VARCHAR(191) NOT NULL, `captcha` VARCHAR(191), `created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),...
-- -- PostgreSQL database dump -- -- Dumped from database version 13.4 -- Dumped by pg_dump version 13.4 SET statement_timeout = 0; SET lock_timeout = 0; SET idle_in_transaction_session_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SELECT pg_catalog.set_config('search_path', '', fal...
-- 2020-06-16T10:47:39.182Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Element (AD_Client_ID,AD_Element_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,Name,PrintName,Updated,UpdatedBy) VALUES (0,577761,0,TO_TIMESTAMP('2020-06-16 13:47:38','YYYY-MM-DD HH24:MI:SS'),100,'D','Y','T...
<filename>sql/documents/ea-hotel-docs.sql insert into documents(url,title,publication_date,modified_date,author,publisher,affected_donors,affected_donees,document_scope,cause_area,notes) values ('https://www.facebook.com/groups/664817953593844/permalink/1481373815271583/','EA Hotel with free accommodation and board f...
<reponame>mfooo/wow<gh_stars>1-10 UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (28465,28600);
<gh_stars>0 USE MovieDB; DROP TABLE IF EXISTS Directors; CREATE TABLE IF NOT EXISTS Directors( MovieID INTEGER NOT NULL ,PersonID INTEGER NOT NULL ,PRIMARY KEY(MovieID,PersonID) ); INSERT INTO Directors(MovieID,PersonID) VALUES (1294,1263); INSERT INTO Directors(MovieID,PersonID) VALUES (1153,1269);...
<gh_stars>1-10 -- 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. -- See the LICENSE and NOTICES files in the project root for more information. CREATE TRIGGER [sample].[sample_Bus...
<reponame>mapofzones/database-hasura ALTER TABLE "public"."zones_stats" ALTER COLUMN "ibc_tx_in_mainnet_rating_diff" SET NOT NULL;
<reponame>alanfeng99/oracle-db-examples select /* PATCHTEST*/ num from tab1 where id = 10; @plan
<gh_stars>100-1000 select distinct repo_group from gha_repos where repo_group is not null order by repo_group asc ;
<filename>dbt_snowflake_demo_i/models/demo_i/demo_i_model_2.sql with mapping as ( select City, Island from {{source('demo_i_sample_data', 'island_mapping')}} ), facts_extend as ( select Team, Location, Rate, Date, Opponet, Win_Loss from {{ref('demo_i_model_1')}} ), final as ( select Team, City, Island, Rate...
<reponame>kerphi/KitGPEC ALTER DATABASE "gpecanalyseur" SET DateStyle =iso, dmy; DROP TABLE IF EXISTS agents CASCADE ; CREATE TABLE agents ( agent_id int NOT NULL, agent_birthdate DATE, agent_contrat Varchar(8) default 'CDI', agent_corps varchar(3), family_id VARCHAR(10), CONSTRAINT pk_agents PRIMARY KEY (age...
<gh_stars>0 INSERT INTO TO_DO(id, created, updated, note) VALUES (1, CURRENT_DATE, CURRENT_DATE, 'hoge'), (2, CURRENT_DATE, CURRENT_DATE, 'fuga'), (3, CURRENT_DATE, CURRENT_DATE, 'piyo');
<filename>soft.sql -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 22, 2019 at 12:31 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";...
/* Navicat MySQL Data Transfer Source Server : localMysql Source Server Version : 50718 Source Host : localhost:3306 Source Database : ruoyi Target Server Type : MYSQL Target Server Version : 50718 File Encoding : 65001 Date: 2019-09-03 16:12:42 */ SET FOREIGN_KEY_CHECKS=0; -- --...
<filename>src/database/getSaleInputs.sql select p.* from sale_input si join product p on p.id = si.product where si.sale = $1;
<reponame>thowbik/phpcode<gh_stars>0 SELECT pending,user_type,auth_cat_id FROM(SELECT SUM(pending) as pending,auth_cat_id FROM (SELECT SUM(CASE WHEN students_school_child_count.sch_directorate_id=schoolnew_moduleauth.school_type THEN CASE WHEN schoolnew_moduleauth.auth_cat_id NOT IN (SELECT auth FROM schoolnew_re...
-- +migrate Up ALTER TABLE `groups_groups` ADD INDEX `ParentOrder` (`idGroupParent`, `iChildOrder`); -- +migrate Down ALTER TABLE `groups_groups` DROP INDEX `ParentOrder`;
<gh_stars>0 SELECT fd.day_of_week, w.weekday, fd.flight_num, fd.origin_airport_id, oa.airport_code AS origin_airport_code, oa.city_name AS origin_city_name, fd.dest_airport_id, da.airport_code AS dest_airport_code, da.city_name AS dest_city_name, FROM flight_delays fd LEFT JOIN airports oa on oa.airport_id = ...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 15, 2018 at 06:33 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE TABLE `text` ( `id` INTEGER PRIMARY KEY AUTOINCREMENT, `imageid` TEXT NOT NULL, `text` TEXT NOT NULL, `language` TEXT NOT NULL, `ip` TEXT NOT NULL, `flagged` INTEGER NOT NULL, `created` DATE DEFAULT (datetime('now')) );
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 22, 2019 at 12:47 PM -- Server version: 10.3.16-MariaDB -- PHP Version: 7.3.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
CREATE TABLE eg_businessdetails ( id bigint NOT NULL, name character varying(100) NOT NULL, businessurl character varying(256), isenabled boolean, code character varying(12) NOT NULL, businesstype character(1), fund character varying(50), function character varying(50), fundsource character varying(50...
update QUESTION set SEQUENCE_STATUS = 'A' where QUESTION_REF_ID in (select QUESTION_REF_ID from QUESTION q1 join (select QUESTION_ID, max(SEQUENCE_NUMBER) as max_sequence_number from QUESTION group by QUESTION_ID) q2 on q1.QUESTION_ID = q2.QUESTION_ID where SEQUENCE_NUMBER < max_seque...
<reponame>cyhfvg/learningMachine /* Navicat Premium Data Transfer Source Server : learningMachineDB Source Server Type : MySQL Source Server Version : 100144 Source Host : Source Schema : learningMachineDB Target Server Type : MySQL Target Server Version : 100144 F...
select id,nombre,fecha_creacion,precio_compra,stock,fecha_abastecimiento from producto
-- +migrate Up -- SQL in section 'Up' is executed when this migration is applied ALTER TABLE operators DROP CONSTRAINT IF EXISTS operators_pkey; ALTER TABLE operators ADD PRIMARY KEY (id,model_name); -- +migrate Down -- SQL section 'Down' is executed when this migration is rolled back ALTER TABLE operators DROP CONS...
-- Initialize the database with some scraps of data. See also init-indices.sql and mysql-acegi-acl.sql. -- hilo for generating IDs, under the MultipleHiLoPerTableGenerator method. -- See http://blog.eyallupu.com/2011/01/hibernatejpa-identity-generators.html drop table if exists hibernate_sequences; create table hibern...
-- This file and its contents are licensed under the Timescale License. -- Please see the included NOTICE for copyright information and -- LICENSE-TIMESCALE for a copy of the license. \c :TEST_DBNAME :ROLE_SUPERUSER \set DN_DBNAME_1 :TEST_DBNAME _1 \set DN_DBNAME_2 :TEST_DBNAME _2 CREATE FUNCTION _timescaledb_intern...
<filename>hive/2_create_partitions.sql<gh_stars>1-10 USE <DATABASE>; SET hive.exec.dynamic.partition.mode=nonstrict; SET hive.exec.dynamic.partition=true; SET hive.exec.max.dynamic.partitions=25560; SET hive.exec.max.dynamic.partitions.pernode=25560; CREATE TABLE <DATABASE>.P_LINEORDER ( LO_ORDERKEY BIGINT, LO_...
<gh_stars>10-100 DROP DATABASE IF EXISTS `grpc-demo`; CREATE DATABASE IF NOT EXISTS `grpc-demo`; USE `grpc-demo`; CREATE TABLE `ToDo` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `title` varchar(200) DEFAULT NULL, `description` varchar(1024) DEFAULT NULL, `reminder` timestamp NULL ...
<filename>src/test/resources/org/support/project/ormapping/gen/dao/sql/ClobTableDao/ClobTableDao_delete.sql<gh_stars>100-1000 DELETE FROM CLOB_TABLE WHERE NO = ? ;
CREATE TABLE IF NOT EXISTS government_agency_type ( government_agency_type_code varchar(3) PRIMARY KEY, description varchar NOT NULL, active_ind boolean, create_user varchar NOT NULL, create_timestamp timestamp with time zone DEFAULT now() NOT NULL, update_user varchar NOT NULL, update_time...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 02, 2019 at 11:33 AM -- Server version: 5.7.23 -- PHP Version: 7.2.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Database: `cms` -- -- ----...
SELECT p.id, p.name, COUNT(t.name) as toy_count FROM people AS p RIGHT JOIN toys AS t ON t.people_id = p.id GROUP BY p.name, p.id
<gh_stars>0 -- Create the snippetbox database CREATE DATABASE snippetbox CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; USE snippetbox; CREATE TABLE snippets ( id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, title VARCHAR(100) NOT NULL, context TEXT NOT NULL, created DATETIME NOT NULL, expires DATETIME ...
<reponame>juanguerra97/rentasgt CREATE TABLE IF NOT EXISTS `__EFMigrationsHistory` ( `MigrationId` varchar(95) NOT NULL, `ProductVersion` varchar(32) NOT NULL, CONSTRAINT `PK___EFMigrationsHistory` PRIMARY KEY (`MigrationId`) ); CREATE TABLE `AspNetRoles` ( `Id` varchar(255) CHARACTER SET utf8mb4 NOT ...
CREATE TABLE [dbo].[Address] ( [Id] INT IDENTITY (1, 1) NOT NULL, [AddressTypeId] INT NOT NULL, [PropertyTypeId] INT NULL, [SubPropertyTypeId] INT NULL, [StreetTypeId] INT NOT NULL, [SuburbId] INT NOT NULL, [PropertyName] NVARCHAR(250) NUL...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 24, 2022 at 09:20 AM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE TABLE IF NOT EXISTS `demo`.`Customer` ( `ID` INT NOT NULL , `Name` TEXT NOT NULL , `PhoneNo` VARCHAR(45) NULL , `Address` VARCHAR(250), `Email` VARCHAR(200), PRIMARY KEY (`ID`) ) ENGINE = InnoDB; CREATE TABLE IF NOT EXISTS `demo`.`Order` ( `ID` INT NOT NULL , `customer_id` INT NULL , PRIMAR...
<reponame>KiritoXF/daily_management_system /* Navicat MySQL Data Transfer Source Server : default Source Server Version : 50726 Source Host : localhost:3306 Source Database : dailysystem Target Server Type : MYSQL Target Server Version : 50726 File Encoding : 65001 Date: 2019-09-20...
SELECT rw.oid AS oid, rw.rulename AS name FROM pg_rewrite rw WHERE {% if tid %} rw.ev_class = {{ tid }} {% elif rid %} rw.oid = {{ rid }} {% endif %} ORDER BY rw.rulename
start transaction; alter table namechanges alter column date set default (now() at time zone 'utc'); update namechanges SET date = date + '5 hours'; alter table nickchanges alter column date set default (now() at time zone 'utc'); update nickchanges SET date = date + '5 hours'; commit transaction; # Try two creat...
-- SELECT DISTINCT pstate FROM people WHERE pstate LIKE 'O_'; -- SELECT pfirstname, plastname, pstate FROM people -- WHERE pstate IN (SELECT DISTINCT pstate FROM people WHERE pstate LIKE 'O_'); -- AGGREGATES -- SELECT COUNT(*) FROM people; -- SELECT COUNT(pid) FROM people; -- SELECT COUNT(*) AS "OR Pop" FROM people ...
<reponame>jdkoren/sqlite-parser<filename>src/test/resources/enc3.test_9.sql -- enc3.test -- -- execsql { -- SELECT rowid FROM t2 WHERE a LIKE x'610062002500'; -- } SELECT rowid FROM t2 WHERE a LIKE x'610062002500';
INSERT INTO `lylme_config` VALUES ('template', 'default','网站模板'); INSERT INTO `lylme_config` VALUES ('cdnpublic', NULL,'CDN地址'); INSERT INTO `lylme_config` VALUES ('apply', 0,'收录申请'); CREATE TABLE `lylme_apply` ( `apply_id` int(4) NOT NULL, `apply_name` varchar(20) NOT NULL, `apply_url` varchar(255) NOT NULL, `...
<gh_stars>0 -- Revert postgraphile_organizations:organization_invitations from pg BEGIN; SET search_path TO app_public,public; DROP TABLE organization_invitations; COMMIT;
/* ========================= Title: Brewfest Author: Nexis Series: Setup ========================= */ /* REMOVE CREATURE SPAWNS */ DELETE FROM `creature_spawns` WHERE `id` BETWEEN '1500000' AND '1500017'; /* REMOVE CREATURE WAYPOINTS */ DELETE FROM `creature_waypoints` WHERE `spawnid` BETWEEN '1500000' AND '150001...
DOMAIN ACTA_SATELLITE { TEMPORAL_MODULE temporal_module = [0, 100], 100; COMP_TYPE SingletonStateVariable PointingModeType ( Earth(), Slewing(), Science(), _Comm(), _Maintenance() ) { VALUE Earth() [1, +INF] MEETS { Slewing(); _Comm(); _Maintenance(); } VALUE Slewing() [3, 3] MEETS { Ea...
/******************************************************************************** file-centric-snapshot-attribute-value-valid-valueid Assertion: ValueId refers to valid concepts in the ATTRIBUTE VALUE snapshot. ********************************************************************************/ insert into qa_resu...
<reponame>gegeturambar/j37_seblod<gh_stars>0 CREATE TABLE IF NOT EXISTS `#__cck_core_preferences` ( `userid` int(11) NOT NULL, `options` text NOT NULL, PRIMARY KEY (`userid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; ALTER TABLE `#__cck_core_types` ADD `asset_id` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `...
DROP TABLE `#__djimageslider`;
DROP VIEW IF EXISTS view_persediaan_barang3_kesbangpol; CREATE VIEW view_persediaan_barang3_kesbangpol AS SELECT *, CASE WHEN pra_saldo > 0 AND jumlah >= pra_saldo THEN pra_saldo WHEN pra_saldo > 0 AND jumlah < pra_saldo THEN jumlah ELSE 0 END AS saldo FROM view_persediaan_barang2_kesbangpol WHERE 1 = ...
<gh_stars>0 CREATE TABLE `track_votes` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(4) unsigned NOT NULL DEFAULT '1', `track_id` int(4) unsigned NOT NULL, `vote` tinyint(3) unsigned NOT NULL, `date_int` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique_vote` (`user_id`,`t...
\pset format unaligned \pset footer off \set VERBOSITY terse create schema irrtest; set datestyle = 'ISO'; create extension pgparts with schema irrtest; create table irr ( id serial primary key, day date not null); -- Must be partitioned select irrtest.create_partition('irr', '2016-01-01', '2017-01-01'); --...
/* db-migrate create passenger-mode -e pg-staging */ ALTER TABLE module_config ADD lock_screen_dismissal_enabled BOOLEAN DEFAULT FALSE NOT NULL; INSERT INTO message_group (message_category, status) VALUES ('LockScreenDismissalWarning', 'PRODUCTION'); INSERT INTO message_text (language_id,text_body, ...
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 10, 2020 at 02:49 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...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Feb 08, 2016 at 10:45 AM -- 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_CLIENT=@@CHARACTER_SE...
<filename>migrations/2020-11-27-141424_create_posts/down.sql<gh_stars>0 -- noinspection SqlResolveForFile -- This file should undo anything in `up.sql` DROP TABLE posts
<gh_stars>0 CREATE TABLE xplugin_s360_amazon_lpa_shop4_tconfig ( cName VARCHAR(255) NOT NULL, cWert VARCHAR(255) NOT NULL ); CREATE TABLE xplugin_s360_amazon_lpa_shop4_taccountmapping ( kKunde INT(10) NOT NULL, cAmazonId VARCHAR(255) NOT NULL, nVerifiziert INT(1) NOT NULL DEFAULT 0, cVerifizieru...
<gh_stars>0 /* Author: <NAME> Query a list of CITY and STATE from the STATION table. The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. */ SELECT CITY,STATE FROM STATION /* Acme LA Addison MI Agency MO Aguanga CA Alanson MI Alba MI ...
<reponame>ZetsubouCode/TokoMotor<filename>toko.sql -- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 06, 2021 at 09:23 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 8.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone ...
insert into users (id, created_at, name) values (1, (now() - interval '175 days, 5 hours'), 'Alice'), (2, (now() - interval '154 days, 7 hours'), 'Bob'), (3, (now() - interval '124 days, 1 hours'), 'Carl'), (4, (now() - interval '101 days, 4 hours'), 'Daphne'), (5, (now() - interval '89 days, 6 hours'), 'Evan'), ...
<gh_stars>0 /*SELECT * FROM movies; SELECT * FROM movies WHERE BINARY title='Terminator'; SELECT * FROM movies WHERE title='terminator'; SELECT * FROM movies WHERE title='terminator' LIMIT 1; INSERT INTO movies (title) VALUES ('Terminator'); INSERT INTO movies (title) VALUES ('The Predator'); INSERT INTO movies (title...
CREATE TABLE `cardapio` ( `id` int(11) NOT NULL, `restaurante_id` int(11) NOT NULL, `nome` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `tipo` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `ingredientes` tinytext COLLATE utf8_unicode_ci, `observacao` text COLLATE utf8_unicode_ci, `preco` decimal(10,2...
alter table "public"."assets" rename column "created_by_id" to "createdById";
<gh_stars>10-100 CREATE TABLE access_tokens ( token TEXT PRIMARY KEY, user_id BIGINT NOT NULL REFERENCES users (id) ON DELETE CASCADE, created TIMESTAMP NOT NULL, valid_thru TIMESTAMP NOT NULL ); CREATE INDEX idx_access_tokens_user_id ON access_tokens ( (user_id) );
<reponame>ponkyh/jaspy -- Your SQL goes here CREATE TABLE client_locations ( id serial PRIMARY KEY NOT NULL, device_id int NOT NULL REFERENCES devices(id), ip_address varchar NOT NULL, port_info varchar NOT NULL );
INSERT INTO `executedScripts` (`name`, `description`, `createdDate`, `executedDate`) VALUES ('181006_01', 'Translate emails to italian', NOW(), NOW()); INSERT INTO `emailTemplates` (`id`, `type`, `language`, `name`, `description`, `subject`, `html`, `createdAt`, `updatedAt`) VALUES (6, 1, 2, 'Benvenuto del cliente',...
<filename>ORACLE_SQL/SHARED_FUNCTIONS/14_ORG/14F042_get_sgmnt_val_id.sql<gh_stars>1-10 /* Formatted on 18/09/2014 08:36:56 (QP5 v5.126.903.23003) */ CREATE OR REPLACE FUNCTION APLAPPS.GET_DIV_TYPE (P_DIVID NUMBER) RETURN VARCHAR2 AS L_RESULT VARCHAR2 (200 BYTE); BEGIN L_RESULT := ''; SELECT APLAPPS.GET...
-- file:update.sql ln:117 expect:true create table part_b_1_b_10 partition of range_parted for values from ('b', 1) to ('b', 10)
<reponame>sergb213/pgtoolsservice {# # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2017, The pgAdmin Development Team # This software is released under the PostgreSQL Licence #} {# -- Given SQL is workaround -- We need to implement a mechanism to check for valid supported server encoding #} SELECT * FROM...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.5.10-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 11.2.0.6213 -- ------------------------------------------...
<filename>schema/04-init_user.sql \c duolingo INSERT INTO duolingo.data.users (id) VALUES (323233417);
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 23-06-2016 a las 21:34:05 -- Versión del servidor: 5.6.21 -- Versión de PHP: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARAC...
<reponame>YuriyGorvitovskiy/statemach-data DROP SCHEMA IF EXISTS ${0} CASCADE
ALTER TABLE `assessment` ADD `parking_fee` INT(3) NOT NULL DEFAULT 0; ALTER TABLE `assessment` ADD `has_allowance` TINYINT(1) NOT NULL DEFAULT 0; ALTER TABLE `users` ADD `parking_fee` INT(3) NOT NULL DEFAULT 0 AFTER `rate_per_hour`; ALTER TABLE `users` ADD `is_fulltime` TINYINT(1) NOT NULL DEFAULT 0 AFTER `parking_fee...
<reponame>Ed-Fi-Alliance-OSS/Ed-Fi-MigrationUtility -- 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. -- See the LICENSE and NOTICES files in the project root for more information....
<reponame>lopamd/webdev<gh_stars>0 USE ECOMMERCE; CREATE TABLE LOGIN ( USERNAME VARCHAR(30) PRIMARY KEY, PASSWORD VARCHAR(30) NOT NULL, LAST_LOGIN TIMESTAMP ); DROP TABLE IF EXISTS REGISTER; CREATE TABLE REGISTER( USERNAME VARCHAR(30) PRIMARY KEY, NAME VARCHAR(30), ADDRESS VARCHAR(100), CITY VARCHAR(30), ZIP VARCHA...
CREATE OR REPLACE EDITIONABLE SYNONYM "STUD_XCRSE" FOR "STUD_XCRSE"@"TRAXLINK.WORLD";
USE ota; -- -- SELECT * FROM zone_with_entry_times; -- SELECT * FROM zone_with_entry_times WHERE cross_in_candle_id != zone_entry_candle_id; -- ******************************************************************************************** DROP VIEW IF EXISTS zone_with_entry_times; CREATE VIEW zone_with_entry_times AS ...
create table transactions ( id varchar(255) not null constraint transactions_pk primary key, height integer not null, type integer not null, sender varchar(255) not null, sender_public_key varchar(255) not null, recipient varchar(255) not null, amount bigint, asset_id varchar(255) default NULL::character v...
<gh_stars>1-10 CREATE TABLE IF NOT EXISTS users ( id UUID NOT NULL PRIMARY KEY, username VARCHAR(255), email VARCHAR(255), first_name VARCHAR(255), last_name VARCHAR(255), enabled BOOLEAN, created_timestamp TIMESTAMPTZ NOT NULL ); CREATE TABLE IF NOT EXISTS roles ( id UUID NOT NULL PRIM...
ALTER TABLE `UserRoleCompanie` ADD COLUMN `companieId` char(30) CHARACTER SET utf8; UPDATE `UserRoleCompanie`, `_UserRoleCompaniesRelation` SET `UserRoleCompanie`.`companieId` = `_UserRoleCompaniesRelation`.A where `_UserRoleCompaniesRelation`.B = `UserRoleCompanie`.`id`; ALTER TABLE `UserRoleCompanie` CHANGE `companie...
<gh_stars>10-100 BEGIN; ALTER TABLE operations DROP COLUMN member; COMMIT;
-- -- Adds the column target_module which will allow filtering terminology by module. -- ALTER TABLE terminologies ADD COLUMN target_module varchar(50); -- As of this migration, only location terminology is available, so the following is perfectly fine UPDATE terminologies SET target_module = 'Location'; -- Add ...
INSERT INTO Terminal(Label) VALUES ('Terminal 1'); INSERT INTO Terminal(Label) VALUES ('Terminal 2'); INSERT INTO Terminal(Label) VALUES ('Terminal 3');
<filename>src/main/resources/sql/h2/schema-with-oracle.sql drop table if exists bookcase_task; drop table if exists bookcase_user; create table bookcase_task ( id bigint, title varchar(128) not null, description varchar(255), user_id bigint not null, primary key (id) ); create table bookcase_user (...
CREATE OR REPLACE PACKAGE SOK_USER_UTIL AS /* FUNCTION user_email_exists ** Check if current user's email is already used, e.g. not used ** return true if the email is already associated with another account, else return false; */ FUNCTION user_email_exists( val_user_email IN SOK_USER.user_email%TYPE) ...
CREATE DATABASE IF NOT EXISTS dating_db; CREATE DATABASE IF NOT EXISTS dating_db_test; CREATE USER 'admin'@'localhost' IDENTIFIED BY 'admin'; GRANT ALL PRIVILEGES ON *.* TO 'admin'@'%';
<filename>DB_Basics_MS_SQL_Server/Exam Preparation/Bakery/14. The Most Positive Country.sql SELECT TOP(1) WITH TIES c.Name AS CountryName, AVG(f.Rate) AS FeedbackRate FROM Countries AS c JOIN Customers AS cc ON c.Id = cc.CountryId JOIN Feedbacks AS f ON cc.Id = f.CustomerId GROUP BY c.Name ORDER BY Feedb...