sql stringlengths 6 1.05M |
|---|
CREATE TABLE Users(
id uuid NOT NULL DEFAULT gen_random_uuid() PRIMARY KEY,
uname text NOT NULL,
password text NOT NULL
);
|
--5
USE SoftUni
GO
SELECT [Name]
FROM [Towns]
WHERE LEN ([Name]) = 5 OR LEN ([Name]) = 6
ORDER BY [Name] ASC
|
<reponame>nathstutanes/movie<gh_stars>0
INSERT INTO `tblFilmGenres`(`strGenre`) VALUES
("Action"),
("Adventure"),
("Comedy"),
("Crime"),
("Drama"),
("History"),
("Horro"),
("Musical"),
("Sci-Fi"),
("War"),
("Western"),
("International"),
("Biography"),
("Romance"),
("Thriller"),
("Sports"),
("Fantasy"),
("Animated"),
(... |
SELECT * FROM ' . $this->table_prefix . 'boardrules';
|
-- rambler up
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE EXTENSION IF NOT EXISTS citext;
-- Idempotent role creation for postgREST users
DO $$ BEGIN
IF NOT EXISTS(SELECT 1 FROM pg_roles WHERE rolname='anonymous') THEN
CREATE ROLE anonymous NOINHERIT;
END IF;
... |
<filename>migration/migrations/3_result_add_log.cql
ALTER TABLE result ADD log text; |
<reponame>ti-techiesnbeyond/maruchan_estudiantes_2021<gh_stars>1-10
-- -------------------------------------------------------------
-- TablePlus 4.2.0(388)
--
-- https://tableplus.com/
--
-- Database: maruchan_estudiantes_2021
-- Generation Time: 2021-09-25 21:08:13.2860
-- --------------------------------------------... |
<reponame>destinyyzy/tf_rmtpp
DROP TABLE IF EXISTS badges_count;
CREATE TABLE badges_count AS (
SELECT id, name, userid, date,
rank() OVER (PARTITION BY userid, name ORDER BY date) AS count
FROM badges
);
CREATE INDEX badges_count_date_idx ON badges_count(date);
CREATE INDEX badges_count_userid_idx... |
-- after WHERE character_name = "<NAME>", add code to put rows in ascending order by the "price" column
SELECT *
FROM purchases
WHERE character_name = "<NAME>"
ORDER BY price ASC; |
-- file:sequence.sql ln:168 expect:true
DROP SEQUENCE myseq2
|
<gh_stars>10-100
-- file:float8.sql ln:49 expect:true
SELECT '' AS one, f.* FROM FLOAT8_TBL f WHERE f.f1 = '1004.3'
|
CREATE OR REPLACE FUNCTION is_superuser()
RETURNS bool
LANGUAGE sql
STABLE
AS
$function$
SELECT EXISTS( SELECT NULL FROM pg_catalog.pg_user WHERE usesuper=TRUE and usename=current_user )
$function$;
|
DROP SEQUENCE IF EXISTS s;
DROP SEQUENCE IF EXISTS s2;
DROP SEQUENCE IF EXISTS s3;
CREATE SEQUENCE IF NOT EXISTS s START WITH 100 INCREMENT BY 10;
CREATE SEQUENCE IF NOT EXISTS s2 START WITH -100 INCREMENT BY -10;
CREATE SEQUENCE IF NOT EXISTS s3 START WITH -100 INCREMENT BY 10 MINVALUE=-100 MAXVALUE=1000;
SELECT NE... |
---------------------------------------------------------------------
-- LAB 16
--
-- Exercise 3
---------------------------------------------------------------------
USE TSQL;
GO
---------------------------------------------------------------------
-- Task 1
--
-- Write T-SQL code that defines the variable @SQLstr ... |
<gh_stars>0
-- name: create-table-stages
CREATE TABLE IF NOT EXISTS stages (
stage_id INTEGER PRIMARY KEY AUTOINCREMENT
,stage_repo_id INTEGER
,stage_build_id INTEGER // TODO: 90689e76-2e64-11e5-9284-b827eb9e62be
,stage_number INTEGER
,stage_kind TEXT
,stage_type TEXT
,stage_name ... |
<reponame>sergey-koumirov/maamon
-- MySQL dump 10.13 Distrib 5.5.47, for debian-linux-gnu (x86_64)
--
-- Host: localhost Database: maamon_dev
-- ------------------------------------------------------
-- Server version 5.5.47-0ubuntu0.14.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4010... |
-- @testpoint: 三权分立关闭时验证用户被删除之后,组关系消失
--step1: 查询三权分立参数enableSeparationOfDuty; expect:显示默认值off
show enableSeparationOfDuty;
--step2: 创建用户; expect:用户创建成功
create user u_sec_role_member_sysadmin_007 sysadmin password '<PASSWORD>';
create user u_sec_role_member_auditadmin_007 auditadmin password '<PASSWORD>';
create... |
select
id as id,
instrument_id as instrument_id,
url as url,
protocol as protocol
from instruments_controller as c
where
c.protocol = $protocol
|
SELECT
guess.g1 AS g1,
guess.g2 AS g2,
answers.word AS answer,
CASE
WHEN answers.letter_one IN (g1_letter_one, g1_letter_two, g1_letter_three, g1_letter_four, g1_letter_five, g2_letter_one, g2_letter_two, g2_letter_three, g2_letter_four, g2_letter_five ) THEN 1
ELSE 0
END AS a1_match,
CASE
WHEN ... |
select prod.name
from products prod
join providers prov on prov.id = prod.id_providers
where prod.amount between 10 and 20
and prov.name like 'P%'; |
CREATE TABLE Contacts (
id serial NOT NULL,
name varchar(255) UNIQUE,
email varchar(255) NOT NULL,
phone varchar(12),
secondary_phone varchar(12),
extension varchar(12),
PRIMARY KEY (email)
);
CREATE TABLE FacultyContacts (
email varchar(255) NOT NULL,
department varchar(255),
P... |
<gh_stars>0
create index biosample_package_name_idx on biosample(package_name);
create index biosample_package_idx on biosample(package);
create index biosample_p_pn_idx on biosample(package, package_name);
create index biosample_env_package_idx on biosample(env_package);
create index biosample_taxonomy_id_idx on biosa... |
CREATE DATABASE DysproBackupManager;
USE DysproBackupManager;
CREATE TABLE Servers
( ServerId INT AUTO_INCREMENT PRIMARY KEY
, HostName VARCHAR(100) NOT NULL
, UserName VARCHAR(100) NOT NULL
, PathSSHKeyFile VARCHAR(500) NOT NULL
, UNIQUE (HostName));
CREATE TAB... |
<filename>homestead.sql
-- phpMyAdmin SQL Dump
-- version 4.4.12
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 22, 2018 at 03:22 AM
-- Server version: 5.6.25
-- PHP Version: 5.6.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@... |
<filename>juno.sql<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : laragon
Source Server Type : MySQL
Source Server Version : 50724
Source Host : localhost:3306
Source Schema : juno
Target Server Type : MySQL
Target Server Version : 50724
File Encoding : 65... |
requirevars 'input_local_tbl' ;
select jdictgroup('variables', variable) as variables
from (
select jgroup(variable, t) as variable
from (
select distinct __colname as variable, typeof(tonumber(__val)) as t
from %{input_local_tbl}
group by __colname
)
);
|
CREATE TABLE IF NOT EXISTS watches
(
id INT AUTO_INCREMENT PRIMARY KEY,
model CHAR(16),
style CHAR(16),
price DECIMAL(6,2)
);
INSERT INTO watches(model , style , price )
VALUES ("Boston","Gents", 70.00),
("Avante","Ladies", 90.00),
("Club","Gents", 60.00),
("Denver","Ladies", 80.00),
("Eton","Gents", 50.00);
... |
<reponame>JohnShandy/swganh
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
# Dumping structure for procedure ga... |
<reponame>ChrisPWill/login_api
ALTER TABLE auth_tokens
ALTER user_id TYPE BIGINT;
ALTER TABLE users
ALTER id TYPE BIGINT;
|
<reponame>openwebsolns/techscore
-- track student profile, as part of the membership database migration
CREATE TABLE student_profile (
id INT UNSIGNED AUTO_INCREMENT,
school varchar(10) COLLATE utf8_unicode_ci NOT NULL,
first_name mediumtext COLLATE utf8_unicode_ci NOT NULL,
middle_name mediumtext COLLATE utf8_... |
<gh_stars>10-100
SET DEFINE OFF;
CREATE TABLE D_CUSTOMER
(
CUSTOMER_ID VARCHAR2(15 BYTE),
ADDRESSID NUMBER(12),
COMPANY_NAME VARCHAR2(100 BYTE),
CUSTOMER_TYPE VARCHAR2(50 BYTE),
MRKCUSTOMERS_PROFILE VARCHAR2(50 BYTE),
MRKCUSTOMERS_COMMENT VARCHAR2(1000 BYTE),
DEFAU... |
-- collate9.test
--
-- execsql {
-- CREATE INDEX xy_i ON xy(x)
-- }
CREATE INDEX xy_i ON xy(x) |
create view airlinebogusview as select YEARI, case when YEARI > 0 then 1 else 1.1 end, case when MONTHI > 1 then 1 else 23 end, case when MONTHI = 1 then 4 else 0.33 end,
case when YEARI > 0 then 2 else 1.1 end, case when MONTHI > 2 then 2 else 23 end, case when MONTHI = 2 then 4 else 0.33 end,
case when YEARI > 0 then... |
<filename>kata-files/lesson2/hsql/expected/MYLARGESCHEMA/sp/SP304.sql
CREATE PROCEDURE SP304(OUT MYCOUNT INTEGER) SPECIFIC SP304_55101 LANGUAGE SQL NOT DETERMINISTIC READS SQL DATA NEW SAVEPOINT LEVEL BEGIN ATOMIC DECLARE MYVAR INT;SELECT COUNT(*)INTO MYCOUNT FROM TABLE186;SELECT COUNT(*)INTO MYCOUNT FROM TABLE389;SELE... |
-- Migration: create users table
-- Created at: 2013-10-02 07:03:11
-- ==== UP ====
CREATE TABLE IF NOT EXISTS hellos(
ID SERIAL PRIMARY KEY,
contador INT DEFAULT 0,
messagem VARCHAR(255) NOT NULL,
data_criacao TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
data_alteracao TIMESTAMP,
data_exclusao TIMESTAMP
);
... |
--------------------------------------------------------------------------------
-- MESSAGE ---------------------------------------------------------------------
--------------------------------------------------------------------------------
----------------------------------------------------------------------------... |
<filename>Hospital_Management_DB/queries/triggers.sql
drop trigger out_patient_next_checkin_date;
DELIMITER $$
CREATE TRIGGER out_patient_next_checkin_date
AFTER INSERT
ON appointment
FOR EACH ROW
BEGIN
CASE
WHEN (SELECT distinct patient.patient_type FROM patient WHERE NEW.booked_by = patient.patient_id) = 0 THE... |
<reponame>KebecStatoil/SqlJambalaya
SELECT sqltext.TEXT,
--'kill ' + cast(req.session_id as nvarchar(max)) + ';' kill_statement,
'exec sp_who ' + cast(req.session_id as nvarchar(max)) user_to_kill,
req.session_id,
req.status,
req.command,
req.cpu_time,
req.total_elapsed_time,
req.total_elapsed_time / 1000 seconds,
req.... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 27-07-2019 a las 06:36:45
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
<filename>server/database.sql
CREATE DATABASE locals_only;
CREATE TABLE users (
id SERIAL PRIMARY KEY,
first_name text NOT NULL,
last_name text NOT NULL,
email text NOT NULL,
pass_word text NOT NULL
);
CREATE TABLE favorite_places (
id SERIAL PRIMARY KEY,
place_id text NOT NULL,
store_... |
<reponame>Helicopt/iKnow<filename>db/triggers.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2017-01-02 17:42:30
-- 服务器版本: 5.6.17
-- PHP Version: 5.6.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `ik... |
<reponame>thewileylab/synPUF
CREATE TABLE attribute_definition (
attribute_definition_id INTEGER NOT NULL,
attribute_name VARCHAR(255) NOT NULL,
attribute_description VARCHAR(MAX) NULL,
attribute_type_concept_id INTEGER NOT NULL,
attribute_syntax VARCHAR(MAX) NULL
)
; |
<gh_stars>0
use labdb;
go
drop service [demo/InventoryService];
drop service [demo/OrderService];
drop queue dbo.demoInventoryQueue;
drop queue dbo.demoOrderQueue;
drop contract [demo/contracts/demoContract];
drop message type [demo/messages/demoRequest];
drop message type [demo/messages/demoResponse];
go
use master;... |
create or replace TRIGGER Lock_ExeEmp_Ins_Up
BEFORE INSERT OR UPDATE ON ExemplaireEmprunte
BEGIN
LOCK TABLE ExemplaireEmprunte IN SHARE MODE;
LOCK TABLE ExemplaireEmprunte@vers_Angers IN SHARE MODE;
END; |
<reponame>nguillaumin/nabaztag-server<filename>net.violet.platform/src/test/java/net/violet/platform/datamodel/factories/implementations/VObjectFactoryImplTest_setup.sql
SET FOREIGN_KEY_CHECKS = 0;
INSERT INTO `user` VALUES (220, 'pass<PASSWORD>','Filipino', '<EMAIL>', 1, -2,1,10165,1,1,'796',0,1,0,0,1,NULL,'FEAE23',... |
<reponame>mliyz/springcloud
/*
SQLyog Ultimate v11.24 (32 bit)
MySQL - 5.7.13 : Database - micro_account
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET ... |
INSERT INTO EGPT_STATUS (id,status_name,created_date,is_active,code) values (nextval('SEQ_EGPT_STATUS'),'REVISION PETITION',CURRENT_TIMESTAMP,'Y','RP');
|
<gh_stars>1-10
SELECT products.id, products.name FROM products INNER JOIN categories ON products.id_categories = categories.id WHERE categories.name LIKE 'super%'
|
<reponame>Vivikar/bMRI_analyzer
-- MySQL dump 10.13 Distrib 5.7.29, for Linux (x86_64)
--
-- Host: zanner.org.ua Database: bMRI_db
-- ------------------------------------------------------
-- Server version 5.7.23-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_... |
-- we have some operators in SQL
-- + - * / AND OR NOT = !=
-- there's also some set operators, which operate on
-- not individual values, but whole SELECT queries
-- UNION, UNION ALL, INTERSECT, EXCEPT.
-- these can only be used on two queries that return compatible sets
-- compatible as in, the number of colum... |
-- 编写一个 SQL 查询,获取 Employee 表中第二高的薪水(Salary) 。
-- +----+--------+
-- | Id | Salary |
-- +----+--------+
-- | 1 | 100 |
-- | 2 | 200 |
-- | 3 | 300 |
-- +----+--------+
-- 例如上述 Employee 表,SQL查询应该返回 200 作为第二高的薪水。如果不存在第二高的薪水,那么查询应返回 null。
-- +---------------------+
-- | SecondHighestSalary |
-- +---------------... |
<reponame>LeoColomb/wordpress-resurrection
/**
* WordPress Resurrection
*
* @author <NAME> <colo<EMAIL>>
* @license ISC
*/
-- -- -- --
-- Posts: Embeds
-- -- -- --
-- This script converts hard-coded embeds to simple URLs.
-- This change allows the WordPress instance to take two advantages:
-- * Being much more f... |
-- MySQL dump 9.11
--
-- Host: localhost Database: Shelter
-- ------------------------------------------------------
-- Server version 4.0.23-standard-log
---
--- Create the database
---
DROP DATABASE IF EXISTS Shelter;
CREATE DATABASE Shelter;
USE Shelter;
--
-- Table structure for table `tCat`
--
DROP TABLE... |
CREATE TABLE Person
(
Id INT IDENTITY(1,1),
LastName VARCHAR(100),
FirstName VARCHAR(100),
Born Date,
Died Date,
CONSTRAINT pk_Person_Id PRIMARY KEY (Id)
);
Go
CREATE TABLE Quote
(
Id INT IDENTITY(1,1),
Text VARCHAR(6000),
Year VARCHAR(4),
Context VARCHAR(6000),
PersonId Int,
CONSTRAINT pk_Quote_I... |
-- 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.
-- Extended Properties [extension].[BehaviorTypeD... |
COMMENT ON COLUMN "public"."journals"."name" IS E'';
alter table "public"."journals" rename column "name" to "title"; |
/****** Object: Table [dbo].[tblSchemaVersion] Script Date: 12/30/2009 11:10:26 ******/
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [dbo].[tblSchemaVersion](
[nVersionKey] [int] IDENTITY(1,1) NOT NULL,
[MajorVersion] [int] NULL,
[MinorVersion] [int] NULL,
[Release] [int] NULL,
[Build] [int] NULL... |
SET search_path = pg_catalog;
-- DEPCY: This INDEX depends on the INDEX: test.the_part_2_c1_idx
DROP INDEX public.the_part_index_c1_idx;
CREATE INDEX the_part_2_c1_idx ON test.the_part_2 USING hash (c1);
CREATE INDEX the_part_index_c1_idx ON ONLY public.the_part USING hash (c1); |
<reponame>SKalt/pg_sql_parser_tests<gh_stars>0
INSERT INTO weather VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');
|
<gh_stars>0
-- @testpoint: opengauss关键字Key_Member(非保留),作为同义词对象名,部分测试点合理报错
--前置条件
drop table if exists explain_test;
create table explain_test(id int,name varchar(10));
--关键字不带引号-成功
drop synonym if exists Key_Member;
create synonym Key_Member for explain_test;
insert into Key_Member values (1,'ada'),(2, '<PASSWORD>')... |
<reponame>salvegame197/fullcycledocker-challenge1
create SCHEMA DB_PFA;
create TABLE DB_PFA.TB_SUBJECTS (
CO_SUBJECT BIGINT AUTO_INCREMENT PRIMARY KEY,
DS_SUBJECT VARCHAR(255),
NU_HRS NUMERIC
) ENGINE=InnoDB DEF... |
CREATE DATABASE IF NOT EXISTS `plex-logging` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `plex-logging`;
-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
--
-- Host: localhost Database: plexlogtest
-- ------------------------------------------------------
-- Server version 5.7.21-0ubuntu0.17.10.1
/*!40101... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 14, 2017 at 04:34 PM
-- Server version: 10.1.21-MariaDB
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET... |
use pothiAromaterapia_db
CREATE TABLE Pessoa (
PessoaId int NOT NULL IDENTITY
, Cpf nvarchar(11) NOT NULL
, Nome nvarchar(100) NOT NULL
, Tel nvarchar(100) NULL
, Email nvarchar(100) NULL
, Sexo int NULL
, EstadoCivil int NULL
, Filhos bit NULL
, Animais bit NULL
, Fumante bit NULL
);
GO
ALTER TABLE Pessoa ADD CONST... |
<gh_stars>0
-- ***************************************************************************
-- File: 12_39.sql
--
-- Developed By TUSC
--
-- Disclaimer: Neither Osborne/McGraw-Hill, TUSC, nor the author warrant
-- that this source code is error-free. If any errors are
-- found in this source code... |
<reponame>actiononme/vulntest
-- MariaDB dump 10.18 Distrib 10.5.8-MariaDB, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: test
-- ------------------------------------------------------
-- Server version 10.5.8-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTE... |
INSERT INTO `records` (`id`, `email`, `ip`, `q1`, `q21`, `q22`, `q23`, `q24`, `q25`, `created_at`, `updated_at`) VALUES (1, '<EMAIL>', '127.0.0.1', 0, 0, 1, 1, 0, 0, '2021-9-7 19:04:30', '2021-9-7 19:04:30');
INSERT INTO `records` (`id`, `email`, `ip`, `q1`, `q21`, `q22`, `q23`, `q24`, `q25`, `created_at`, `updated_at`... |
<reponame>jeffreypolk/FF
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
CREATE TABLE [FF].[Player](
[PlayerId] [int] IDENTITY(1,1) NOT NULL,
[Name] [varchar](50) NOT NULL,
[NFLTeam] [varchar](50) NOT NULL,
[Position] [varchar](50) NOT NULL,
[Age] [int] NOT NULL,
[Experience] [int] NOT NULL,
[ADP] [decimal](10, 2) NO... |
<filename>db/migrations/000001_init_schema.up.sql
CREATE TABLE "accounts" (
"id" SERIAL PRIMARY KEY,
"name" VARCHAR(255) NOT NULL,
"email" VARCHAR(255) UNIQUE NOT NULL,
"hashed_password" VARCHAR(255) NOT NULL,
"avatar_url" VARCHAR(255) NOT NULL DEFAULT ('avatars/deafault_avatar.jpeg'),
"is_admin" BOOLEAN NO... |
<filename>Queries/Employee_Database_challenge.sql
SELECT e.emp_no,
e.first_name,
e.last_name,
t.title,
t.from_date,
t.to_date
INTO retirement_titles
FROM employees as e
INNER JOIN titles as t
ON e.emp_no = t.emp_no
WHERE (birth_date BETWEEN '1952-01-01' AND '1955-12-31')
ORDER BY e.emp_no;
SELECT emp_no,
f... |
<reponame>alvinnava13/foodie-blog<filename>src/main/resources/data.sql<gh_stars>0
INSERT INTO user (first_name, last_name, username, password) VALUES
('Alvin', 'Nava', 'alvinnava', '$2a$10$UUzt5vuagwwRgKBdjguksugN4bGPM7mjKZP1gtrlegaAkxXcrVfJu'),
('John', 'Doe', 'johndoe', '$2a$10$UUzt5vuagwwRgKBdjguksugN4bGPM7mjKZP1gtr... |
/*
SQLyog Ultimate v12.2.6 (64 bit)
MySQL - 10.2.36-MariaDB-cll-lve : Database - bbdb4393_dahlolet
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_F... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2017 at 09:39 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 5.6.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<filename>V1/Database/Stored Procedures/FF.uspManagerStatsGet.sql<gh_stars>0
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [FF].[uspManagerStatsGet]
(
@LeagueId int,
@MinYear int,
@MaxYear int
)
AS
SELECT
ManagerId,
Name,
Wins,
Loses,
Ties,
Games,
CASE Games WHEN 0 THEN 0 EL... |
<gh_stars>0
SELECT a_int FROM types_i WHERE a_uint = ?
|
INSERT INTO Employees (first_name, last_name, role_id, manager_id)
VALUES ("Curt", "Smith", 9, 8),
("Reginald", "Dowling", 5, 12),
("Allan", "Arellano", 11, 15),
("Marvin", "Downs", 16, 0),
("Lila", "Paterson", 2, 12),
("Roscoe", "Sykes", 15, 4),
("Jaya", "Fellows", 6, 8),
("Gurdeep", "Mackay", 8, 0),
("Yunus", "Berge... |
<reponame>Foxpips/LayeredArchitecture
/*********************************************************************************************************************
**
** Procedure Name : h3giCatalogueCreateHandsetTariffCombination
** Author : <NAME>
** Date Created :
** Version : 1.0.0
** ... |
drop view if exists "EmailDto";
create view "EmailDto"
as
select
"Id" as "EmailId"
from "Email"
|
<filename>MockExam/Answers/Task-06.sql<gh_stars>1-10
SELECT COUNT(*)
FROM (
SELECT g_id, SUM(mo_percentage)
FROM gmadeof
GROUP BY g_id
HAVING SUM(mo_percentage) <> 100) Result;
-- Answer: 4267
/*
* This answer is not complete. And the answer is not correct. You forgot to check
* for null. Here there ... |
<filename>exercises/second.sql<gh_stars>1-10
use sakila
SET @DELAY = 2;
SELECT "Elenco degli attori in ordine alfabetico (cognome e nome)" AS Query;
SET @DELAY = @DELAY + SLEEP(@DELAY);
SELECT last_name, first_name
FROM actor
ORDER BY last_name, first_name;
SELECT "Elenco dei film in ordine di durata decrescent... |
<filename>src/main/resources/db/migration/V1__Create_recall_table.sql
CREATE TABLE RECALL (
id UUID PRIMARY KEY,
noms_number text
) |
-- AlterTable
ALTER TABLE "users" ADD COLUMN "active" BOOLEAN NOT NULL DEFAULT true;
|
CREATE TABLE ac3 (
id INTEGER,
nome TEXT NOT NULL,
email TEXT,
PRIMARY KEY(id)
) |
<filename>schema/delta.mariadb.sql
ALTER TABLE user_address_balance ADD COLUMN IF NOT EXISTS message TEXT(2187) DEFAULT NULL; |
DROP table if exists pg_table_unique cascade;
CREATE table pg_table_unique (i int, t text, constraint unique1 unique(i)) distributed by (i);
select oid, gp_segment_id, conname from pg_constraint where conrelid = 'pg_table_unique'::regclass;
select oid, gp_segment_id, conname from gp_dist_random('pg_constraint') where... |
ALTER TABLE codes
ADD deleted_at TIMESTAMP NULL;
ALTER TABLE holds DROP CONSTRAINT redemption_code_unique_per_event;
ALTER TABLE codes DROP CONSTRAINT redemption_code_unique_per_event;
DROP FUNCTION IF EXISTS redemption_code_unique_per_event(UUID, TEXT, TEXT);
ALTER TABLE holds
ADD deleted_at TIMESTAMP NULL;
U... |
<gh_stars>1-10
-- add new flag to RestOptions---
ALTER TABLE RestOptions add modifiedByUser bit(1) NOT NULL default 0;
|
-- +migrate Down
DROP INDEX IF EXISTS "idx_deployments_public_id";
-- +migrate Up
CREATE UNIQUE INDEX "idx_deployments_public_id"
ON "deployments" ("public_id");
|
<filename>bsdmag/06-indexes/06-partial-difficulty-index.sql
UPDATE pg_index SET indisvalid = false WHERE indexrelid = 'idx_difficulty'::regclass;
CREATE INDEX idx_difficulty_avg
ON articles(difficulty)
WHERE difficulty = 'AVG';
VACUUM FULL ANALYZE articles;
SELECT relname, reltuples, relpages ... |
CREATE OR REPLACE FUNCTION fnc_concat_ws(text, VARIADIC text[])
RETURNS text LANGUAGE sql IMMUTABLE AS 'SELECT array_to_string($2, $1)';
SELECT 'fnc_concat_ws exists is ' || exists(SELECT * FROM pg_proc WHERE proname = 'fnc_concat_ws') |
create table J(licence number(10),
cnum number(10) not null,
salaire number(10) not null,
sport varchar(20)
);
drop table C;
create table C (
cnum number(10) not null,
nom varchar(20) not null,
division number(1) not null,
ville varchar(20),
constraint cleC primary key(cnum)
);
@liste
s... |
-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 14, 2022 at 06:25 AM
-- Server version: 10.4.24-MariaDB
-- PHP Version: 7.4.28
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Aug 30, 2020 at 01:49 PM
-- Server version: 10.1.10-MariaDB
-- PHP Version: 5.6.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR... |
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: dokument_react
-- ------------------------------------------------------
-- Server version 8.0.18
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS ... |
-- --------------------------------------------------------
-- Hôte : localhost
-- Version du serveur: 5.7.19 - MySQL Community Server (GPL)
-- SE du serveur: Win64
-- HeidiSQL Version: 9.4.0.5125
-- --------------------------------------------------------
/*... |
<filename>GITCLASS/Banco de Dados/Exercicios SQL Casa/Query SQL Pessoas.sql
INSERT INTO pessoas
(Nome, Nascimento, Sexo, Peso, Altura, Nacionalidade)
values
('John', '1975-04-01', 'M', 85.90, 2.15, 'EUA'),
('Enzo', '2014-02-01', 'M', 30.60, 1.30, 'EUA'),
('Jared', '2013-07-06', 'M', 32.90, 1.15, 'Canada'),
('Valentina... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 26 Sep 2021 pada 02.59
-- Versi server: 10.4.6-MariaDB
-- Versi PHP: 7.3.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
CREATE DATABASE loginapp CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
GRANT ALL PRIVILEGES ON loginapp.* TO 'loginapp'@'%' IDENTIFIED BY 'loginapp';
USE loginapp;
CREATE TABLE IF NOT EXISTS credential (
id INT AUTO_INCREMENT PRIMARY KEY,
username varchar(255) NOT NULL,
password varchar(255) NOT N... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 15, 2019 at 01:34 AM
-- Server version: 5.7.24
-- PHP Version: 7.1.26
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101... |
<filename>deploy/owncloud_install.sql
-- mysql create db for owncloud with user e password
CREATE DATABASE owncloud ;
CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'owncloud' ;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' ;
FLUSH PRIVILEGES ; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.