sql
stringlengths
6
1.05M
<filename>schema/004-repair_run_progress_segment_error_start_tokens.cql -- Repair ALTER TABLE repair_run_progress ADD segment_error_start_tokens list<bigint>;
SELECT ITEM_DESCRIPTION, COUNT(ITEM_DESCRIPTION) FROM transactionsT GROUP BY ITEM_DESCRIPTION;
# Ex 01 CREATE DATABASE softuni_stores_system; use softuni_stores_system; CREATE TABLE towns( id INT PRIMARY KEY AUTO_INCREMENT, `name` VARCHAR(20) NOT NULL UNIQUE ); CREATE TABLE addresses( id INT PRIMARY KEY AUTO_INCREMENT, `name` VARCHAR(50) NOT NULL UNIQUE, town_id INT NOT NULL, CONSTRAINT fk_...
ALTER TABLE dbo.DimEmployee ADD CONSTRAINT [FK_DimEmployee_ParentEmployeeKey_DimEmployee] FOREIGN KEY ([ParentEmployeeKey]) REFERENCES DimEmployee([EmployeeKey])...
<reponame>ShenYongji/NEU -- Lab 2 Solutions -- 2-1 select SalesPersonID, SalesOrderID, cast(OrderDate as date) 'Order Date', round(TotalDue, 2) 'Total Due' from Sales.SalesOrderHeader where SalesPersonID = 276 and TotalDue > 40000 order by SalesPersonID, OrderDate; --2-2 Select TerritoryID as...
<reponame>dyalanz/Active_Walking_front<gh_stars>0 -- MySQL Script generated by MySQL Workbench -- Sat Apr 18 17:35:14 2020 -- 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...
<reponame>lgcarrier/AFW SET DEFINE OFF; ALTER TABLE AFW_11_ENTIT ADD ( CONSTRAINT AFW_11_ENTIT_FK1 FOREIGN KEY (REF_VERSN) REFERENCES AFW_11_VERSN (SEQNC) ON DELETE CASCADE ENABLE VALIDATE) /
CREATE PROCEDURE ProcName AS BEGIN DECLARE @RCodeQuery NVARCHAR(max); DECLARE @RCode NVARCHAR(max); DECLARE @ParmDefinition NVARCHAR(max); SET @RCodeQuery = N'SELECT @RCodeOUT = RCode FROM RCodeTable WHERE SProcName = ''ProcName'''; SET @ParmDefinition = N'@RCodeOUT NVARCHAR(max) OUTPUT'; EXEC sp_executesql @RCodeQu...
<filename>apex/f770/application/shared_components/user_interface/lovs/lov_core_flags_name_value.sql prompt --application/shared_components/user_interface/lovs/lov_core_flags_name_value begin -- Manifest -- LOV_CORE_FLAGS (NAME, VALUE) -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2021.0...
-- 2021-09-10T12:49:20.091283900Z -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Column (AD_Client_ID,AD_Column_ID,AD_Element_ID,AD_Org_ID,AD_Reference_ID,AD_Table_ID,ColumnName,Created,CreatedBy,DDL_NoForeignKey,EntityType,FacetFilterSeqNo,FieldLength,IsActive,IsAdvancedText,IsAllowLo...
<filename>5_exInsertOrderTest.sql USE TSQLT_NH_Example; GO EXEC tSQLt.NewTestClass 'exInsertOrderTests' GO -- -- example of a Fake table behavior - constraints are not applied and have to be tested separately -- here the value == 0 can be inserted ignoring check and customer id is a foreign key for non-existi...
<gh_stars>1-10 update vdc_options set option_value = '{"windows": "RHEV-Spice", "linux" : "xorg-x11-drv-qxl" }' where option_name = 'SpiceDriverNameInGuest';
<gh_stars>10-100 CREATE TABLE IF NOT EXISTS ez_organization ( id INT NOT NULL AUTO_INCREMENT COMMENT '记录主键' , code varchar(200) NOT NULL COMMENT '组织编码' , name varchar(200) NOT NULL COMMENT '组织名称' , image varchar(200) NOT NULL COMMENT '组织图标' , category varchar(200) NOT NULL COMMENT '组织类型' , enabl...
<filename>test/db-sql-server/init/database.sql /*Create database*/ CREATE DATABASE star_wars; GO USE star_wars; GO /*Create tables*/ CREATE TABLE planet( id INT PRIMARY KEY, name VARCHAR(255), rotation_period INT, orbital_period INT, diameter INTEGER, climate VARCHAR(255), gravity VARCHAR(...
-------------------------------------------------------------------------------- CREATE TYPE ABILITY AS ENUM ( ); -------------------------------------------------------------------------------- CREATE TABLE jail_templates ( id BIGSERIAL NOT NULL PRIMARY KEY , timestamp TIMESTAMP NOT NULL DEFAULT now() , na...
-- Xóa Quản trị viên -- -- usp_deleteManager '025022111' Create Procedure usp_deleteManager @id nchar(10) As Begin Delete From QuanTriVien Where CMND = @id End
<filename>openGaussBase/testcase/KEYWORDS/than/Opengauss_Function_Keyword_Than_Case0033.sql -- @testpoint:opengauss关键字than(非保留),作为视图名 --关键字explain作为视图名,不带引号,创建成功 CREATE or replace VIEW than AS SELECT * FROM pg_tablespace WHERE spcname = 'pg_default'; drop view than; --关键字explain作为视图名,加双引号,创建成功 CREATE or replace VI...
<reponame>onesword0618/leetcode Create table If NOT EXISTS courses (student varchar(255), class varchar(255)); Truncate table courses; insert into courses (student, class) values ('A', 'Math'); insert into courses (student, class) values ('B', 'English'); insert into courses (student, class) values ('C', 'Math'); inser...
-- https://stackoverflow.com/questions/25145648/select-from-large-table-or-split-table-and-make-many-small-queries ------------------------------------------------------------- -- TABLE initial_table --DROP TABLE segments CASCADE; CREATE TABLE initial_table ( user_id NUMERIC(38,0) NOT NULL, session_id NUMERIC(38...
<reponame>SafraPC/SUGEF<gh_stars>0 create database SUGEF; USE SUGEF; create table Users( userId integer AUTO_INCREMENT, userName varchar(50) not null, userTipo varchar(50) not null, userLogin Varchar(50) not null UNIQUE, userSenha Varchar(100) not null, userNascimento date not null, userCpf varchar(11) not null, use...
-- examples on insert alter session set current_schema = hron; -- check the current table status describe service; select s.service_id, s.name, location_id, l.city from service s left outer join location l using (location_id); -- plain insert insert into service (service_id, name, location_id) values (20, 'Mayday S...
<reponame>vdergachev/old-school-stuff drop table gklients_distribution_token_link cascade ;
<filename>db/informes_general.sql -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 20-12-2021 a las 17:04:36 -- Versión del servidor: 10.4.20-MariaDB -- Versión de PHP: 7.4.22 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zo...
<gh_stars>1-10 \c my_db; --- Create your table here
-- Deploy seattleflu/schema:shipping/schema to pg begin; create schema shipping; comment on schema shipping is 'Outgoing warehouse data prepared for external consumers'; commit;
<reponame>Gnu-Sauvage/miaou<gh_stars>100-1000 create table watch ( player integer references player(id), room integer references room(id), primary key(player, room) );
-- AlterTable ALTER TABLE "socialdata" ADD COLUMN "orderIndex" SERIAL NOT NULL;
<reponame>Shuttl-Tech/antlr_psql -- file:brin.sql ln:454 expect:true INSERT INTO brin_test SELECT x/100,x%100 FROM generate_series(1,10000) x(x)
<reponame>chengwenxin/sqlite-parser -- original: thread005.test -- credit: http://www.sqlite.org/src/tree?ci=trunk&name=test CREATE TABLE t1(a, b) ;ATTACH 'test2.db' AS aux ;CREATE TABLE aux.t1(a INTEGER PRIMARY KEY, b UNIQUE); INSERT INTO t1 VALUES(1, 1); INSERT INTO t1 VALUES(2, 2) ;ATTACH 'test2.db' AS au...
-- -- Copyright 2004-2014 The Kuali Foundation -- -- Licensed under the Educational Community 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.opensource.org/licenses/ecl2.php -- -- Unless requi...
<reponame>francesco1119/QueryLauncher<filename>QueryLauncher/Queries/13.sql -- 13 Latch Stats -- clear latch stats using DBCC SQLPERF ('sys.dm_os_latch_stats', CLEAR); if needed WITH Latches AS (SELECT latch_class, wait_time_ms / 1000.0 AS WaitS, waiting_requests_count AS WaitCount, 100.0 * wait_time_ms ...
<gh_stars>0 SELECT count(*) FROM book WHERE NOT EXISTS ( SELECT 1 FROM checkout_item WHERE book_id = book.id ); Answer = 6
/* Navicat Premium Data Transfer Source Server : thatblog Source Server Type : MySQL Source Server Version : 100128 Source Host : www.thatblog.cn:3306 Source Schema : thatblog Target Server Type : MySQL Target Server Version : 100128 File Encoding : 65001 Date: 10/06...
ALTER TABLE trafficlog ADD UserAgent VARCHAR(255) NULL;
<filename>extensions/spark/kyuubi-spark-connector-tpch/src/main/resources/tpch/q3.sql -- -- 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 licens...
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50528 Source Host : localhost:3306 Source Database : reading Target Server Type : MYSQL Target Server Version : 50528 File Encoding : 65001 Date: 2015-05-21 21:58:55 */ SET FOREIGN_KEY_CHE...
<reponame>angoca/log4db2<filename>src/examples/sql-pl/resignal/ExampleResignal.sql --#SET TERMINATOR @ /* Copyright (c) 2012 - 2014, <NAME> (AngocA) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. ...
<gh_stars>1-10 --[er]tests months_between function using timestamp type as its operands select months_between(date'11/10/2000', timestamp'8/8/2008 8:8:8 am') from db_root; select months_between(timestamp'8/8/2008 8:8:8 am', date'11/10/2000') from db_root; select months_between(timestamp'8/8/2008 8:8:8 am', timestamp'8...
-- @testpoint: opengauss关键字condition(非保留),作为同义词对象名,部分测试点合理报错 --前置条件 drop table if exists condition_test; create table condition_test(id int,name varchar(10)); --关键字不带引号-成功 drop synonym if exists condition; create synonym condition for condition_test; insert into condition values (1,'ada'),(2, 'bob'); update conditio...
<filename>emulador/sql-files/upgrades/upgrade_20200126.sql ALTER TABLE `achievement` MODIFY `count1` int unsigned NOT NULL default '0', MODIFY `count2` int unsigned NOT NULL default '0', MODIFY `count3` int unsigned NOT NULL default '0', MODIFY `count4` int unsigned NOT NULL default '0', MODIFY `count5` int unsign...
<gh_stars>0 create table RunStats.ActivityMetadata ( ID bigserial primary key, UserID varchar(50) not null, DistanceMeters double precision not null, DurationSeconds bigint not null, StartTime bigint not null, UUID varchar(36) not null, UNIQUE(StartTime, UserID) );
begin; insert into services (id, name, url, comment, slo, slourl) values ( '448D1117-2AA7-49F2-B7C1-1CDAD0E5EB71', 'foo-https', 'https://foo.example.com/casHandler', 'secure foo service', true, 'https://foo.example.com/slo' ); insert into services (id, name, url, comment, slo) values ( ...
<filename>db/soil.sql -- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 25, 2019 at 06:34 AM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:0...
<reponame>i7sid/Smart-Freezer-Project<gh_stars>0 drop table if exists power_consumption; drop table if exists epex_prices; create table power_consumption ( id integer primary key autoincrement, day text not null, hour integer not null, amount real not null ); create table epex_prices ( id integer primary ke...
<filename>src/main/resources/sql/boostrap.sql CREATE SCHEMA warehouse; USE warehouse; CREATE TABLE product( id BIGINT PRIMARY KEY AUTO_INCREMENT UNIQUE NOT NULL, name VARCHAR(30) NOT NULL, photo VARCHAR(100), price REAL NOT NULL, unit VARCHAR(30) NOT NULL, description TEXT, added_date DATETIME...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.58.3 -- Waktu pembuatan: 24 Sep 2020 pada 12.30 -- Versi server: 10.4.11-MariaDB -- Versi PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
-- MySQL dump 10.13 Distrib 5.5.46, for debian-linux-gnu (i686) -- -- Host: localhost Database: radar -- ------------------------------------------------------ -- Server version 5.5.46-0ubuntu0.14.04.2 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA...
CREATE DATABASE IF NOT EXISTS emmental; USE emmental; CREATE TABLE Users( userID BINARY(16) NOT NULL, username VARCHAR(30) NOT NULL, password VARCHAR(255) NOT NULL, CONSTRAINT users_pk PRIMARY KEY (userID), CONSTRAINT unique_username UNIQUE (username) ); CREATE TABLE Content( contentID BINARY(16) NOT NULL, ...
use Main go select stdev(PiezoX) as PiezoXDeviation, stdev(PiezoY) as PiezoYDeviation, stdev(PiezoZ) as PiezoZDeviation from May18PCBTest select max(PiezoX) as PiezoXMax, avg(PiezoX) as PiezoXAvg, Min(PiezoX) as PiezoXMin, max(PiezoY) as PiezoYMax, avg(PiezoY) as PiezoYAvg, Min(PiezoY) as PiezoYMin, ...
/*Table structure for table `local_weather` */ DROP TABLE IF EXISTS `local_weather`; CREATE TABLE `local_weather` ( `id` int(6) unsigned NOT NULL AUTO_INCREMENT, `zip5` int(11) NOT NULL, `date` datetime NOT NULL, `TemperatureF` float(5,2) DEFAULT NULL, `DewpointF` float(5,2) DEFAULT NULL, `Pressure` float...
-- file:json.sql ln:324 expect:true select '{"f2":{"f3":1},"f4":{"f5":99,"f6":"stringy"}}'::json#>array['f4','f6']
<reponame>dhjournals/code -- Get all DH pubs drop table if exists dh_pubs_intermediate; create temp table dh_pubs_intermediate as select distinct b.doi, a.level from dh_journals a join pubs b on a.issn_p = b.issn_p union select distinct b.doi, a.level from dh_journals a join pubs b on a.issn_e = b.issn_e; -- Get all...
######################################################################################################### -- This document was created with the purpose of provide the code snippers necessary to follow the text -- processing workshop. A PowerPoint presentation with other learning material will be provide after the -...
<reponame>shaileshre-tech/business-process-engine-poc INSERT INTO USERS (USERNAME, PASSWORD, ENABLED) VALUES ('kermit', <PASSWORD>', true); INSERT INTO AUTHORITIES (USERNAME, AUTHORITY) VALUES ('kermit', 'ROLE_ACTUATOR'); INSERT INTO AUTHORITIES (USERNAME, AUTHORITY) VALUES ('kermit', 'ROLE_camunda-admin');
<filename>DMS5/T_Acceptable_Param_Entries_Data.sql /****** Object: Table [T_Acceptable_Param_Entries] ******/ /****** RowCount: 40 ******/ SET IDENTITY_INSERT [T_Acceptable_Param_Entries] ON INSERT INTO [T_Acceptable_Param_Entries] (ID, Parameter_Name, Description, Parameter_Category, Default_Value, Display_Name, C...
<reponame>Lijie002/microservice /* Navicat MySQL Data Transfer Source Server : 阿里云 Source Server Version : 50730 Source Host : 192.168.3.11:3306 Source Database : rainbow Target Server Type : MYSQL Target Server Version : 50730 File Encoding : 65001 Date: 2020-07-01 15:57:24 */ SE...
SELECT A_Name AS Game, B_Released AS ReleaseDate, C_Recommendations AS Reviews, D_Metacritic AS Score, PriceInitial AS Price FROM `steamgames.data` WHERE (IsAction = "TRUE") AND (A_Name <> "") AND (D_Metacritic >= 0) AND (C_Recommendations >= 0) ORDER BY D_Metacritic DESC, PriceInitial DESC, A...
<gh_stars>100-1000 select l_linenumber, l_orderkey from lineitem order by l_orderkey desc, l_linenumber asc;
IF OBJECT_ID('[DOI].[spQueue_InsertSQLCommand]') IS NOT NULL DROP PROCEDURE [DOI].[spQueue_InsertSQLCommand]; GO /****** Object: StoredProcedure [DOI].[spDDI_RefreshIndexStructures_InsertSQLCommand] Script Date: 3/17/2021 11:55:15 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE PROCEDURE [D...
<filename>Base/sql/scada_4.1_erwin.sql CREATE TABLE CmdType ( CmdTypeID int NOT NULL , Name nvarchar(50) NOT NULL , Descr nvarchar(100) NULL , CONSTRAINT pk_CmdType PRIMARY KEY (CmdTypeID ASC) ) go CREATE TABLE CmdVal ( CmdValID int NOT NULL , Name ...
<filename>apps/fgta/riset/pros02/pros02.sql<gh_stars>1-10 CREATE TABLE `mst_pros` ( `pros_id` varchar(16) NOT NULL , `pros_name` varchar(60) NOT NULL , `pros_iscommit` tinyint(1) NOT NULL DEFAULT 0, `pros_commitby` varchar(14) , `pros_commitdate` datetime , `pros_version` int(4) NOT NULL DEFAULT 0, ...
set session role= 'userresourceexclude4'; select * from a; select * from b;
delete from UsuarioEntity; delete from MultimediaEntity; delete from ArchivoEntity;
<reponame>disislast/skripsi_matanusa /* Navicat Premium Data Transfer Source Server : nusatani Source Server Type : MariaDB Source Server Version : 100137 Source Host : localhost:3306 Source Schema : nusa Target Server Type : MariaDB Target Server Version : 100137 File Encodin...
create procedure crear_mov_act(IN actId int, IN fech date, IN descrip text, IN cant int, IN mont double, IN prov int, IN movCon int) begin declare exit handler for sqlexception begin get diagnostics condition 1 @mensaje = MESSAGE_TEXT; select @mensaje as erro...
<filename>sql/news.sql -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 13, 2019 at 10:20 PM -- Server version: 5.5.58-0ubuntu0.14.04.1 -- PHP Version: 5.6.32-1+ubuntu14.04.1+deb.sury.org+2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+...
<reponame>richobaltasar/IOTProject<gh_stars>0 CREATE TABLE [dbo].[DataModule] ( [IdModul] BIGINT IDENTITY (1, 1) NOT NULL, [NamaModule] NVARCHAR (MAX) NULL, [Action] NVARCHAR (MAX) NULL, [Controller] NVARCHAR (MAX) NULL, [Img] NVARCHAR (MAX) NULL, [Status] INT ...
<filename>175. Combine Two Tables/solution.sql # WRITE your MySQL query STATEMENT below SELECT P.FirstName AS `FirstName`, P.LastName AS `LastName`, A.City AS `City`, A.State AS `State` FROM Person P LEFT JOIN Address A ON P.PersonId = A.PersonId
<gh_stars>0 -- Add default 'admin:admin' user with role 'ADMIN' insert into account (id, username, password, roles) values (1, 'admin', <PASSWORD>', 'ADMIN');
/* DESCRIBE `twitch_user`; +-------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------------------+--------------+------+-----+---------+----------------+ | id | int(11) | NO | PRI | NULL | a...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 16, 2020 at 03:02 PM -- Server version: 10.1.30-MariaDB -- PHP Version: 7.2.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
# SELECT # REPLACE # ( # column, string_target, replacement_string # ) # FROM table; # SELECT # REPLACE # ( # title, 'e', '3' # ) # FROM books; SELECT REPLACE ( SUBSTRING( title,1 , 9 ), 'e', '3' ) FROM books;
<gh_stars>0 Use ObservationsTest RAISERROR ('Cleaning', 0, 1) WITH NOWAIT Delete Instrument_Sensor from Instrument_Sensor inner join Sensor on (Instrument_Sensor.SensorID = Sensor.ID) where Sensor.Code like '_Test_%' Delete Sensor where Code like '_Test_%' Delete DataSourceRole from DataSourceRole inner join DataSource...
<gh_stars>1-10 update usuarios set (distancia_aviso) = ($1) where _id = $2
<filename>sql/V1.0__Create_Tables.sql delimiter $$ CREATE TABLE `fuelUnits` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `unit` VARCHAR(20) NOT NULL, `unitName` VARCHAR(50) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id_UNIQUE` (`id` ASC) )$$ CREATE TABLE `fuelConsumptionUnits` ( `id` INT(11) NOT NUL...
Select * From OpenRowset('MSOLAP', 'Data Source=.;Initial Catalog=Adventure Works DW 2016;', 'SELECT [Measures].DefaultMember ON 0 FROM [Adventure Works]')
<filename>schema/1.0/revision-268/users_and_items.sql ALTER TABLE `users` ADD `loginID` INT( 11 ) NULL DEFAULT NULL , ADD `tempUser` TINYINT( 1 ) NOT NULL; ALTER TABLE `items` DROP `bAlwaysVisible` , DROP `bAccessRestricted` ;
<filename>Easy/175 - Combine Two Tables.sql # Write your MySQL query statement below SELECT P.firstName, P.lastName, A.city, A.state FROM Person AS P LEFT JOIN Address AS A ON P.personId = A.personId ;
UPDATE VERSION SET VERSION = 12;
<reponame>jdkoren/sqlite-parser -- in2.test -- -- execsql { -- CREATE TABLE a(i INTEGER PRIMARY KEY, a); -- } CREATE TABLE a(i INTEGER PRIMARY KEY, a);
<filename>src/test/resources/sql/create_policy/bcc5b646.sql<gh_stars>10-100 -- file:rowsecurity.sql ln:1328 expect:true CREATE POLICY p1 ON current_check FOR SELECT USING (currentid % 2 = 0)
-- CreateTable CREATE TABLE "Role" ( "id" TEXT NOT NULL, "name" TEXT, "canManageProducts" BOOLEAN, "canSeeOtherUsers" BOOLEAN, "canManageUsers" BOOLEAN, "canManageRoles" BOOLEAN, "canManageCart" BOOLEAN, "canManageOrgs" BOOLEAN, PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Us...
<gh_stars>0 -- -- Object Types -- declare begin acs_object_type.create_type ( 'rss_gen_subscr', -- object_type 'RSS Generation Subscription', -- pretty_name 'RSS Generation Subscriptions', -- pretty_plural 'acs_object', -- supertype 'rss_gen_subscrs', -- table_name 'subscr_id', -- id_c...
<reponame>JoeY34kaze/gw2spidy # This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; ALTER TABLE `recipe` ADD `karma_cost` INTEGER AFTER `cost`; # This restores the fkey checks, after having unset them earlier SET FOREIGN...
SET FOREIGN_KEY_CHECKS = 0; DROP TABLE IF EXISTS `harv_target`; CREATE TABLE IF NOT EXISTS `harv_target` ( `auid` int(11) NOT NULL AUTO_INCREMENT, `euid` char(40) DEFAULT NULL, `suid` char(70) DEFAULT NULL, `puid` char(20) DEFAULT NULL, `stamp` datetime DEFAULT CURRENT_TIMESTAMP, `author` varchar(80) DEFAUL...
<reponame>syk0707/model2_mysql_company<gh_stars>0 --테이블 생성 CREATE TABLE kmmanufacture( num INT NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(10) NOT NULL, -- 글쓴이성명 subject VARCHAR(100) NOT NULL, -- 제목 subtitle VARCHAR(100) NOT NULL, -- 부제 content VARCHAR(4000) NOT NULL, ...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Apr 04, 2022 at 11:36 PM -- Server version: 10.2.43-MariaDB-cll-lve -- PHP Version: 7.3.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
USE `ruk`; SELECT `id`, CONCAT_WS(' ', `first_name`, `last_name`) AS `full_name`, CONCAT('$', `salary`) AS `salary`, `started_on` FROM `employees` WHERE `salary` >= 100000 AND YEAR(`started_on`) > 2017 ORDER BY `salary` DESC , `id`;
SELECT c.[Name], COUNT(h.Id) AS [Hotels] FROM Cities AS c LEFT JOIN Hotels AS h ON h.CityId = c.Id GROUP BY c.[Name] ORDER BY [Hotels] DESC, c.[Name]
<reponame>cahutton/us-judicial-geography<filename>sql/setup.sql /* us-judicial-geography/sql/setup.sql */ \set DATA_PATH :BASE_PATH /data \set DOWNLOAD_PATH :BASE_PATH /download \set JUDICIAL_CIRCUIT_DATA :DATA_PATH /judicial_circuit.csv \set JUDICIAL_DISTRICT_DATA :DATA_PATH /judicial_district.csv \set JUDICIAL_DIS...
<filename>egov/egov-pgr/src/main/resources/db/migration/main/V20151106160339__pgr_alter_complaint_crn.sql ALTER TABLE egpgr_complaint ALTER COLUMN crn TYPE VARCHAR(32); ALTER TABLE egpgr_complaint ALTER COLUMN crn SET NOT NULL; ALTER TABLE egpgr_complaint ADD CONSTRAINT unq_crn UNIQUE (crn);
<filename>Difinity 2019/DatabaseInternals/DatabaseInternals/08.AllocationPages.sql /****** Script for SelectTopNRows command from SSMS ******/ /* 12 13 15 18 21 22 33 35 39 45 49 55 76 81 83 84 88 92 96 98 100 102 104 106 108 114 117 123 125 129 130 131 134 137 141 142 144 145 146 147 150 152 154 156 157 162 166 187 1...
<reponame>TSG405/SQL_HackerranK ''' Problem Statement: https://www.hackerrank.com/challenges/revising-the-select-query/problem @Coded by TSG, 2020 ''' SELECT * FROM City WHERE CountryCode = 'USA' AND Population >= 100000;
CREATE PROCEDURE [dbo].GetTransferRequestsForReceiver @receiverEmployerAccountId BIGINT AS SELECT TransferRequestId ,ReceivingEmployerAccountId ,ReceivingLegalEntityName ,CohortReference ,CommitmentId ,SendingEmployerAccountId ,TransferCost ,FundingCap ,[Status] ,ApprovedOrRejectedByUserName ...
<gh_stars>100-1000 -- ================ can be safely applied multiple times ================ -- new email template was added DELETE FROM `sys_email_templates` WHERE `Name`='t_MemChanged'; INSERT INTO `sys_email_templates` (`Name`, `Subject`, `Body`, `Desc`, `LangID`) VALUES ('t_MemChanged', 'Your membership level ...
--:setvar Login N'REDMOND\glenga' --:setvar Password N'<PASSWORD>' --:setvar PubServer N'GLENGATEST2' --:setvar SubServer N'GLENGATEST2' -------------------------------------------------------------------------- -- Create AdventureWorks2012Replica if not exists --------------------------------------------------...
<reponame>cawrites/sql-docs<filename>docs/2014/snippets/tsql/SQL15/tsql/statisticsddl/transact-sql/snippet_create_update_drop_stats.sql --<snippetCreateStats1> USE AdventureWorks2012; GO CREATE STATISTICS ContactMail1 ON Person.Person (BusinessEntityID, EmailPromotion) WITH SAMPLE 5 PERCENT; --</snippet...
<filename>neeyoo-common/src/main/resources/db/init.sql -- ---------------------------- -- Table structure for `neeyoo_consumer` -- Description: 用户表 -- ---------------------------- DROP TABLE IF EXISTS `neeyoo_consumer`; CREATE TABLE `neeyoo_consumer` ( `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'id', `user_phone` ...
create table "a" ( "id" integer not null primary key, "name" varchar(20) ); create table "b" ( "id" integer not null primary key, "name" varchar(20), "a_id" integer references "a" ("id") ); insert into "a" ("id", "name") values ( 10, 'myname' ); insert into "b" ("id", "name", "a_id") values ( ...
<reponame>go-squads/project-a3 CREATE ROLE admin; CREATE ROLE client; GRANT INSERT,SELECT,UPDATE ON configuration,namespace,application TO admin; GRANT INSERT,SELECT,UPDATE ON configuration,configuration_change,history TO admin; GRANT USAGE, SELECT ON SEQUENCE application_id_seq,history_id_seq, namespace_id_seq, users...