sql stringlengths 6 1.05M |
|---|
select * from ehrms2.eip_edEmp_profile; -- 員工自我維護檔(新問候語,問候語大頭貼)
select * from information_schema.columns where TABLE_NAME='eip_edEmp_profile';
select * from ehrms2.ac_pwd_rule; -- 密碼原則設定檔
select * from ehrms2.ac_group; -- 成員群組檔
select * from ehrms2.ac_group_rule; -- 成員群組-規則檔
select * from ehrms2.ac_group_expand; -... |
<gh_stars>0
delete from course c
where c.subject in (select subject
from enroll
group by subject, num
having count(stuid) <=1)
AND c.num in (select num
from enroll
group by subject, num
having count(stuid) <=1)
; |
insert into users(oid, username, password, last_password_reset, authorities,version) values('19c0f5b8149811e793ae92361f002671', 'user', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', null, 'USER',0)
insert into users(oid, username, password, last_password_reset, authorities,version) values('<PASSWORD>'... |
USE [AIDE]
GO
/****** Object: StoredProcedure [dbo].[sp_InsertAttendanceForLeaves] Script Date: 04/22/2020 5:28:36 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[sp_InsertAttendanceForLeaves]
@from DATETIME,
@to DATETIME,
@EMP_ID INT,
@STATUS INT
AS
DECLARE @DEPTID INT = (S... |
-- +goose Up
-- SQL in this section is executed when the migration is applied.
CREATE TABLE am.certificate_queries_subdomains (
etld_id serial not null primary key,
etld varchar(512) not null unique,
query_timestamp bigint
);
CREATE TABLE am.certificate_subdomains (
subdomain_id bigserial not null pri... |
-- upgrade --
ALTER TABLE "lottery" ADD "number_of_winning_tickets" INT NOT NULL DEFAULT 1;
-- downgrade --
ALTER TABLE "lottery" DROP COLUMN "number_of_winning_tickets";
|
-- file:roleattributes.sql ln:23 expect:true
SELECT * FROM pg_authid WHERE rolname = 'regress_test_def_createrole'
|
<filename>src/test/resources/sql/revoke/6023e6e4.sql
-- file:privileges.sql ln:480 expect:true
REVOKE ALL ON FUNCTION int8(integer) FROM PUBLIC
|
<reponame>jaime-carrillo/sql-challenge<gh_stars>0
-- List the following details of each employee: employee number, last name, first name, sex, and salary.
SELECT e.emp_no, e.last_name, e.first_name, e.sex, s.salary
FROM salaries AS s
INNER JOIN employees AS e ON
e.emp_no=s.emp_no;
-- List first name, last name, and hi... |
<gh_stars>0
insert into product(, "", "", , ); |
<reponame>codemonstur/dbDiff
SET FOREIGN_KEY_CHECKS = 0;
CREATE TABLE `notification` ( `notification_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `babyshower_id` int(10) unsigned NOT NULL, `created_date` bigint(20) NOT NULL, `trigger_date` bigint(20) NOT NULL, `type` int(11) NOT NULL, `is_sent` bit(1) NOT NULL DEFAUL... |
-- Eternity II Solution Tree and Results Database Creation Script --
create type search.action as enum ( 'DONE', 'GO', 'PENDING' );
create table search.tree
(
path ltree PRIMARY KEY,
tag search.action,
creation_time TIMESTAMP WITH TIME ZONE default current_timestamp
);
create table search.results
(
path ltre... |
<filename>xwCore/src/main/resources/db/migration/V1_3__create_system_distributed.sql
CREATE TABLE `distributed_task_data`(
`id` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
`business_type` TINYINT(2) NOT NULL DEFAULT 0 COMMENT '业务类型',
`business_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT '业务id',
`status` TINY... |
--
-- semi joins
--
set schema 's';
-- a bunch of equi-joins
-- two way
select EMP.EMPNO, EMP.LNAME from EMP, DEPT
where EMP.DEPTNO = DEPT.DEPTNO order by EMPNO;
select DEPT.DNAME from EMP, DEPT
where EMP.DEPTNO = DEPT.DEPTNO order by DNAME;
-- three way
SELECT EMP.LNAME
from EMP, DEPT, LOCATION
where EMP.DEPTNO=... |
<gh_stars>1-10
-- start_ignore
SET gp_create_table_random_default_distribution=off;
-- end_ignore
CREATE TABLE ct_ao_vacuum1(
text_col text,
bigint_col bigint,
char_vary_col character varying(30),
numeric_col numeric,
int_col int4,
float_col float4,
int_array_col int[],
drop_col numeric,
before_rename_col int4,
change... |
-- @testpoint:opengauss关键字checkpoint(非保留),作为用户组名
--关键字不带引号-成功
drop group if exists checkpoint;
create group checkpoint with password '<PASSWORD>';
drop group checkpoint;
--关键字带双引号-成功
drop group if exists "checkpoint";
create group "checkpoint" with password '<PASSWORD>';
drop group "checkpoint";
--关键字带单引号-合理报错
drop ... |
DROP DATABASE IF EXISTS book_shop;
CREATE DATABASE book_shop CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
use book_shop;
-- Robert
-- Products
CREATE TABLE Products(
product_id BIGINT AUTO_INCREMENT NOT NULL,
product_name varchar(100) NOT NULL,
value int(10) NOT NULL,
PRIMARY KEY (product_id)
);
INSERT INTO Products ... |
<reponame>Idzikowski-Casey/column-topology
DROP SCHEMA ${data_schema} CASCADE;
DROP SCHEMA ${project_schema} CASCADE;
DELETE FROM projects WHERE project_id = :project_id;
|
<filename>server/db/seed.sql
INSERT INTO users (auth_id, first_name, last_name, email_address) VALUES ('auth0|60d68c7dc0b80a006a831d43', 'Carly', 'Dekock', '<EMAIL>');
INSERT INTO users (auth_id, first_name, last_name, email_address) VALUES ('auth0|6100548cc724050071b58567', 'Carly', 'McBride', '<EMAIL>');
INSERT INT... |
<reponame>Hecate946/Sketyl
CREATE TABLE IF NOT EXISTS spotify_auth (
user_id TEXT PRIMARY KEY,
token_info JSONB DEFAULT '{}'::JSONB
);
CREATE INDEX IF NOT EXISTS token_idx ON spotify_auth(user_id, token_info); |
CREATE PROCEDURE usp_DeleteEmployeesFromDepartment(@departmentId INT)
AS
DELETE FROM Departments
WHERE DepartmentID = @departmentId
|
<filename>notebooks/cw-lesson7/lesson7-examples-insert.sql<gh_stars>0
USE WideWorldImporters;
INSERT INTO Warehouse.Colors
(ColorId, ColorName, LastEditedBy)
VALUES
(NEXT VALUE FOR Sequences.ColorID, 'Ohra', 1);
INSERT INTO Warehouse.Colors
(ColorId, ColorName, LastEditedBy)
VALUES
(NEXT VALUE FOR Sequences.Color... |
<reponame>CaosMx/codewars
-- On the Canadian Border (SQL for Beginners #2)
/*
*You are a border guard sitting on the Canadian border. You were given a list of travelers who have arrived at your gate today. You know that American, Mexican, and Canadian citizens don't need visas, so they can just continue their trips. Y... |
set define off verify off feedback off
whenever sqlerror exit sql.sqlcode rollback
--------------------------------------------------------------------------------
--
-- ORACLE Application Express (APEX) export file
--
-- You should run the script connected to SQL*Plus as the Oracle user
-- APEX_050100 or as the owner ... |
<reponame>dimiantoni/flexy-teste-tecnico
# ************************************************************
# Sequel Pro SQL dump
# Version 4135
#
# http://www.sequelpro.com/
# http://code.google.com/p/sequel-pro/
#
# Host: 127.0.0.1 (MySQL 5.5.42)
# Database: flexy
# Generation Time: 2015-11-16 11:24:20 +0000
# **********... |
<reponame>Dalgerok/Twitsenger<filename>clear.sql
DROP SCHEMA IF EXISTS public CASCADE;
CREATE SCHEMA public;
|
<gh_stars>1-10
CREATE PROCEDURE [dbo].[uspEducationResultSelectByCandidateId]
@candidateId int,
@applicationId Int
AS
BEGIN
SET NOCOUNT ON
DECLARE @applicationStatus int
-- get the application status.
select @applicationStatus = applicationStatusTypeId
from Application
where ApplicationId = @ap... |
<filename>server/db/migrations/20180619162615_observation_data.sql
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE `observation_data` (
`id` int(11) UNSIGNED NOT NULL COMMENT '管理用',
`observation_position_id` int(11) UNSIGNED NOT NULL COMMENT '観測点のID',
`sensor_id` int(... |
<reponame>Wippo-Store/WippoStore<gh_stars>1-10
create database wippodb;
use wippodb;
create table if not exists Usuario(
ID_Usuario int(11) not null AUTO_INCREMENT,
Correo_Electronico varchar(40) not null,
Contraseña varchar(40) not null,
Nombre varchar(15) not null,
Apellido_Paterno varchar(15... |
-- Drop articles table if exists.
DROP TABLE IF EXISTS articles;
|
INSERT INTO breeding_method (id, abbreviation, name, description) VALUES ('breeding_method1', 'MB', 'Male Backcross', 'Backcross to recover a specific gene.');
INSERT INTO breeding_method (id, abbreviation, name, description) VALUES ('breeding_method2', 'S', 'Self', 'Self pollination');
|
-- CreateTable
CREATE TABLE `files` (
`name` VARCHAR(50) NOT NULL,
`mimetype` VARCHAR(50) NOT NULL,
`path` TEXT NOT NULL,
`originalfilename` TEXT NOT NULL,
PRIMARY KEY (`name`)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- CreateTable
CREATE TABLE `haste` (
`id` VARCHAR(255) N... |
-----------------------------------------------------------------
-- follow queries run by a specific session_id
-- change the <session_id>
--
-- <EMAIL>, go ahead license
-----------------------------------------------------------------
CREATE EVENT SESSION [trace_session_id] ON SERVER
ADD EVENT sqlserver.q... |
<reponame>dram/metasfresh
-- 2021-05-05T09:19:50.730Z
-- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator
UPDATE AD_Element_Trl SET Name='API Antwort Revision', PrintName='API Antwort Revision',Updated=TO_TIMESTAMP('2021-05-05 12:19:50','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Element_ID=579126 AND... |
CREATE OR REPLACE FUNCTION qnodes(q text) RETURNS text
LANGUAGE 'plpgsql' AS
$$
DECLARE
exp TEXT;
mat TEXT[];
ret TEXT[];
BEGIN
--RAISE NOTICE 'Q: %', q;
FOR exp IN EXECUTE 'EXPLAIN ' || q
LOOP
--RAISE NOTICE 'EXP: %', exp;
mat := regexp_matches(exp, ' *(?:-> *)?(.*Scan)');
--RAISE NOTICE 'MAT:... |
/**
* Триггер обновляющий данные в полях в таблицы EMPLOYEES:
* UPD_COUNTER числового типа для счетчика оптимистичной блокировки
* CRT_USER текстового типа для хранения имени пользователя, создавшего запись в таблице
* CRT_DATE для хранения даты создания записи
* UPD_USER текстового типа для хранения и... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Anamakine: 127.0.0.1
-- Üretim Zamanı: 15 Eyl 2021, 14:05:09
-- Sunucu sürümü: 10.4.17-MariaDB
-- PHP Sürümü: 8.0.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER... |
BEGIN;
-- ROLE anonymous
-- ROLE anonymous_user
-- ROLE application
-- USER application_user
COMMIT;
|
<reponame>KostadinovK/CSharp-DB
SELECT [Name] AS [Game],
CASE
WHEN DATEPART(HOUR, [Start]) >= 0 AND DATEPART(HOUR, [Start]) < 12 THEN 'Morning'
WHEN DATEPART(HOUR, [Start]) >= 12 AND DATEPART(HOUR, [Start]) < 18 THEN 'Afternoon'
WHEN DATEPART(HOUR, [Start]) >= 18 AND DATEPART(HOUR, [Start]) < 24 THEN 'Evening'
... |
<filename>more_windowing_functions.sql
/*
Aggregate functions -AVG, SUM, COUNT, MIN, MAX, etc
Ranking Functions - RANK, DENSE_RANK, ROW_NUMBER, etc
Analytic functions - LEAD, LAD, FIRST_VALUE, LAST_VALUE
When Over() is used with the above, it controls the partitioning and ordering of rows that are
passed into th... |
<reponame>EphermeralCC/COMP303_JavaEE
SELECT albums.AlbumId,
genres.Name AS 'GenreName',
artists.Name AS 'ArtistName',
albums.Title,
albums.Price,
albums.AlbumArtUrl
FROM albums
INNER JOIN genres ON albums.GenreId = genres.GenreId
INNER JOIN artists ON albums.ArtistId = artists.ArtistId
ORDER BY... |
-- create table
create table client (
uid serial primary key,
name varchar(200)
);
create table pet (
uid serial primary key,
client_id int not null references client(uid),
nick varchar(200)
); |
/*
* Copyright (c) 2010-2014 LabKey Corporation
*
* Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
*/
SELECT
b.id,
b.date,
b.testId,
--b.runId,
b.resultOORIndicator,
b.result,
b.qualresult,
b.remark,
b.qcstate,
b.taskid
FROM study."Chem... |
<reponame>coconut2015/jaqy
--------------------------------------------------------------------------
-- .exec command test
--------------------------------------------------------------------------
.help exec
.exec lib/count.spl
.exec dummy.sql
.run ../common/mysql_setup.sql
USE vagrant;
CREATE TABLE MyTable
(
a IN... |
-- AlterTable
ALTER TABLE "Request" ADD COLUMN "message_translation" JSONB;
|
<filename>db_patches/0023_AddExternalCommentTechRev.sql
DO
$$
BEGIN
IF register_patch('AddExternalCommentTechRev.sql', 'fredrikbolmsten', 'Logging', '2020-04-01') THEN
BEGIN
ALTER TABLE technical_review ADD COLUMN public_comment text;
END;
END IF;
END;
$$
LANGUAGE plpgsql; |
<reponame>mbustamanteAseinfo/configManager
/* Script Generado por Evolution - Editor de Formulación de Planillas. 16-01-2017 11:40 AM */
begin transaction
delete from [sal].[fac_factores] where [fac_codigo] = 'c1e6999c-9b4d-4a8d-825b-ef938d1891d1';
insert into [sal].[fac_factores] ([fac_codigo],[fac_id],[fac_descrip... |
<gh_stars>0
--
-- PostgreSQL database dump
--
-- Dumped from database version 14.1
-- Dumped by pg_dump version 14.1
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_pa... |
CREATE TABLE "tests" (
"ID" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
"Name" TEXT NOT NULL,
"Description" TEXT,
"LabSection" TEXT,
"ClinicalData" TEXT,
"PanelTest" INTEGER NOT NULL,
"HidePatientName" INTEGER NOT NULL,
"PrevalenceThreshold" INTEGER,
"TargetTAT" NUMERIC,
"CostToPatient" NUMERIC
);
|
<filename>migration/initial_schema.sql
CREATE TABLE surl (
id SERIAL PRIMARY KEY,
url VARCHAR(2048) NOT NULL UNIQUE,
hash VARCHAR(10) NOT NULL UNIQUE
); |
<filename>sql/show-fk.sql<gh_stars>0
-- show-fk.sql - report foreign key constraints
@clears
col cuser noprint new_value uuser
prompt FK Columns for which account?:
set term off feed off
select upper('&1') cuser from dual;
set term on feed on
col owner format a10
col table_name format a30 head 'TABLE'
col parent_ta... |
<reponame>satrio6210/KPPL
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 19 Okt 2017 pada 18.20
-- Versi Server: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA... |
<gh_stars>0
--
-- Table structure for table `reg_login_attempt`
--
CREATE TABLE IF NOT EXISTS `reg_login_attempt` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ip` int(11) unsigned NOT NULL,
`email` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
`ts` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY ... |
<gh_stars>1-10
CREATE VIEW [etljob].[vw_Application]
AS
SELECT [ApplicationID]
,[Application]
FROM [etljob].[Application]
|
<reponame>dsalunga/mPortal
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[WebPagePanel]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[WebPagePanel](
[PagePanelId] [int] NOT NULL,
[TemplatePanelId] [int] NOT NULL,
[PageId] [int] NOT NUL... |
<gh_stars>1-10
--How to Reset Table Identity
Use DBase
go
select * from DemoIdentityTable
go
insert into DemoIdentityTable(Name,Address) values ('Alice','917 SL')
insert into DemoIdentityTable(Name,Address) values ('Bob','987 ASL')
insert into DemoIdentityTable(Name,Address) values ('John','f7 erf')
go
select * fro... |
<gh_stars>1-10
CREATE TYPE fact_loader.table_load_type AS ENUM('delta','full_refresh');
|
<reponame>Shuttl-Tech/antlr_psql
-- file:jsonb.sql ln:278 expect:true
SELECT jsonb '{"a":null, "b":"qq"}' ?| ARRAY['a','b']
|
--
-- Checks whether the given string is a valid datetime.
--
DELIMITER $$
DROP FUNCTION IF EXISTS _as_datetime $$
CREATE FUNCTION _as_datetime(txt TINYTEXT) RETURNS DATETIME
DETERMINISTIC
NO SQL
SQL SECURITY INVOKER
COMMENT 'Convert given text to DATETIME or NULL.'
BEGIN
declare continue handler for SQLEXCEPTIO... |
<filename>samples/features/json/code-generator/generate-json-crud.sql
/********************************************************************************************************************************************************
*
* Functions that generate CREATE PROCEDURE script that inserts, updates, retreives, and merg... |
-- Your SQL goes here
CREATE TABLE levels (
id SERIAL PRIMARY KEY,
user_id BIGINT NOT NULL,
guild_id BIGINT NOT NULL,
msg_all_time BIGINT NOT NULL,
msg_month BIGINT NOT NULL,
msg_week BIGINT NOT NULL,
msg_day BIGINT NOT NULL,
last_msg TIMESTAMP NOT NULL
)
|
<gh_stars>10-100
ALTER TABLE lti_mapping MODIFY ( matchpattern VARCHAR2(255) );
ALTER TABLE lti_mapping MODIFY ( launch VARCHAR2(255) );
ALTER TABLE lti_content MODIFY ( title VARCHAR2(255) );
ALTER TABLE lti_tools MODIFY ( title VARCHAR2(255) );
ALTER TABLE lti_tools MODIFY ( launch VARCHAR2(1024) ... |
<reponame>treason258/TrePHP
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "150620", "150622", "河北秦皇岛", "北戴河&南戴河", "端午节");
INSERT INTO timeline_content (type, date_start, date_end, content, remark, remark2) VALUES (1, "160609", "160610", "北京怀柔", "青龙峡&雁栖湖", "端午节");
INSERT ... |
CREATE TABLE [dbo].[Comments]
(
[CommentsID] [bigint] NOT NULL,
[ObjectType] [char] (3) COLLATE Chinese_PRC_CI_AS NOT NULL,
[FK_ObjectID] [bigint] NULL,
[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL,
[Email] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL,
[ParentCommentID] [bigint] NOT NULL,
[GoodCount] [in... |
<gh_stars>0
# --- Created by Ebean DDL
# To stop Ebean DDL generation, remove this comment and start using Evolutions
# --- !Ups
create table bio (
id bigserial not null,
flora varchar(255),
fauna varchar(255),
contaminacionagua ... |
<filename>src/example_generated_sql/example_predict_query.sql
# Copyright 2021 Google LLC.
#
# Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0
#... |
<filename>sql/associated_accessions.sql
create table associated_accessions (
associated_accession_id serial primary key,
hgnc text,
tx_ac text,
gene_id integer,
pro_ac text,
origin text not null,
added timestamp with time zone not null default now()
);
create index associated_accessions... |
-- Rename pfRules to ofPfRules
ALTER TABLE pfRules DROP CONSTRAINT pfRules_id;
ALTER TABLE pfRules RENAME TO ofPfRules;
ALTER TABLE ofPfRules ADD CONSTRAINT ofPfRules_id PRIMARY KEY(id);
UPDATE ofVersion set version=2 where name='packetfilter';
|
<gh_stars>10-100
//// CHANGE name=change0
CREATE TABLE table486 (
id integer NOT NULL,
field1 character varying(30),
usertype2field usertype2,
usertype1field usertype1,
usertype6field usertype6
);
GO
//// CHANGE name=change1
ALTER TABLE ONLY table486
ADD CONSTRAINT table486_pkey PRIMARY KEY ... |
/*
RETURN TagKey SINGLE
ID NVARCHAR(36) NOT
KeyValue NVARCHAR(255) NOT
*/
DROP PROCEDURE IF EXISTS `GetTagKeyByKey`;
CREATE PROCEDURE `GetTagKeyByKey` (_KeyValue NVARCHAR(255))
#BEGIN#
SELECT
T.Id,
T.KeyValue
FROM TagKey T
WHERE T.KeyValue = _KeyValue; |
-- USE ctsi_dropper_s;
-- Store database modification log
CREATE TABLE Version (
verID varchar(255) NOT NULL DEFAULT '',
verStamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
verInfo text NOT NULL,
PRIMARY KEY (verID)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO Version... |
<gh_stars>1-10
drop table if exists t1,t_d_1,t_d_2,c,bb;
create table t_d_1(i int);
create table t_d_2(i int);
create table t1 (a int, b int);
insert into t1 values(1,2),(3,4);
insert into t_d_1
WITH cte AS
(
select count(distinct a) from t1 group by a with rollup
) select * from cte;
insert into t_d_2
WITH cte AS
(... |
SELECT b.EMPLID
, ACAD_CAREER
, INSTITUTION
, b.STRM
, CLASS_NBR
, CRSE_CAREER
, SESSION_CODE
, SESSN_ENRL_CNTL
, STDNT_ENRL_STATUS
, ENRL_STATUS_REASON
, ENRL_ACTION_LAST
, ENRL_ACTN_RSN_LAST
, ENRL_ACTN_PRC_LAST
, STATUS_DT
... |
<filename>database/Fructose.Database/scripts/fructose.sql
PRINT 'Running DDL Pre-Process...'
GO
/*
* ###########################################################
* Create the database
* ###########################################################
*/
IF EXISTS (SELECT * FROM sys.databases WHERE name = N'Fructo... |
-- AlterTable
ALTER TABLE "Usuario" ADD COLUMN "role" TEXT NOT NULL DEFAULT E'user';
|
<reponame>angry-tony/GovernIT<gh_stars>0
------------------ ES: MÓDULO DE MAPAS DE DECISIÓN ---------------------------
------------------ EN: DECISION MAPS ENGINE ---------------------------
-- ES: Borrado de toda la información de las 6 tablas del módulo de Mapas de Decisión --
-- EN: Deleting of all informati... |
<filename>src/main/resources/db/migration/V68__behandling_henlegg_årsak.sql
ALTER TABLE behandling RENAME COLUMN behandlingsresultat_henlagt_arsak TO henlagt_arsak; |
begin;
create sequence trans_id_seq
start with 1
increment by 1
no minvalue
no maxvalue
cache 1;
create sequence acct_id_seq
start with 1
increment by 1
no minvalue
no maxvalue
cache 1;
create sequence cat_id_seq
start with 1
increment by 1
no minvalue
no maxvalue
cache 1;
create sequence expected_id_seq
start with... |
<filename>review_mysql/test04_pagequery.sql<gh_stars>1-10
/*
【分页查询】
应用场景:
当要显示的数据,一页显示不全,需要分页提交sql请求
语法:
select 查询列表
from 表
【join type join 表2
on 连接条件
where 筛选条件
group by 分组字段
having 分组后的筛选
order by 排序的字段】
limit 【offset,】size;
offset要显示条目的起始索引(起始索引从0开始)
size 要显示的条目个数
特点:
①limit语句放在查询语句的最后
②公式
要显示的页数 p... |
DROP EVENT IF EXISTS `purge_sessions`;
DROP EVENT IF EXISTS `purge_copy_paste_tokens`;
DROP TABLE IF EXISTS `copy_paste_tokens`;
DROP TABLE IF EXISTS `sessions`;
DROP TABLE IF EXISTS `users`;
DROP TABLE IF EXISTS `auth_migration_version`;
DROP TABLE IF EXISTS `auth_migrations`;
|
<filename>demo_tables/auth_users.sql<gh_stars>1-10
declare
v_name varchar2(30 char) := 'AUTH_USERS';
begin
for i in (
select v_name from dual
minus
select table_name from user_tables where table_name = v_name
)
loop
execute immediate q'{
create table auth_users (
id v... |
<reponame>TrainingByPackt/MySQL
USE test;
--disable_warnings
DROP TABLE IF EXISTS logincount;
--enable_warnings
CREATE TABLE logincount (user varchar(255) primary key, logins int not null);
INSERT INTO logincount VALUES ('jdoe', 1) ON DUPLICATE KEY
UPDATE logins=logins+1;
SELECT * FROM logincount;
INSERT INTO log... |
-- +goose Up
-- SQL in this section is executed when the migration is applied.
CREATE INDEX jobs_status ON jobs (status);
-- +goose Down
-- SQL in this section is executed when the migration is rolled back.
DROP INDEX jobs_status;
|
<reponame>smith750/kc<gh_stars>0
DECLARE temp NUMBER;
BEGIN
SELECT MIN(ROLE_PERM_ID) INTO temp FROM KRIM_ROLE_PERM_T
WHERE ROLE_ID = (SELECT ROLE_ID from KRIM_ROLE_T WHERE NMSPC_CD = 'KC-SYS' AND ROLE_NM = 'Application Administrator')
AND (PERM_ID IS NULL OR PERM_ID IN (SELECT PERM_ID FROM KRIM_PER... |
<reponame>w203654/guns
INSERT INTO `guns`.`sys_menu` (`id`, `code`, `pcode`, `pcodes`, `name`, `icon`, `url`, `num`, `levels`, `ismenu`, `tips`, `status`, `isopen`) VALUES ('996419001653268481', 'warehouse', '0', '[0],', '产铝量盘存台账', '', '/warehouse', '99', '1', '1', NULL, '1', '0');
INSERT INTO `guns`.`sys_menu` (`id`, ... |
<reponame>JeromeRocheteau/emit<gh_stars>1-10
CREATE TABLE `experiments` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`deleted` datetime DEFAULT NULL,
`measurand` bigint(20) NOT NULL,
`environment` bigint(20) NOT NULL,
`experiment` bigint(20) DEFAULT NULL,
`started` datetime DEFAULT NULL,
`stopped` datetime ... |
# --- !Ups
CREATE TABLE "diff" (
"id" VARCHAR(100) NOT NULL PRIMARY KEY,
"diff" VARCHAR(102400) NOT NULL,
"created_at" TIMESTAMP NOT NULL
);
CREATE TABLE "comment" (
"id" SERIAL PRIMARY KEY,
"comment" VARCHAR(102400) NOT NULL,
"diff_id" VARCHAR(100),
"original_file" VARCHAR(200),
"changed_file" VARCHAR... |
<gh_stars>1-10
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('329299', 'Red Fedora', 'Official Red Hat Fedora', 34.99);
INSERT INTO PRODUCT (item_id, name, description, price) VALUES ('329199', 'Forge Laptop Sticker', 'JBoss Community Forge Project Sticker', 8.50);
INSERT INTO PRODUCT (item_id, name, ... |
<filename>br/tests/lightning_duplicate_detection/data/dup_detect.tf.1.sql
insert into tf values (33, '44ea7e50', 1597631244433372786);
insert into tf values (21, 'ea92b2bc', 8350061931822383463);
insert into tf values (29, 'd800f4f3', 3042440053175428524);
insert into tf values (31, '5f7a7433', 629744129778687863);
ins... |
<reponame>3liuhernandez/gomuf<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 05-08-2020 a las 21:12:52
-- Versión del servidor: 10.4.11-MariaDB
-- Versión de PHP: 7.3.18
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET ... |
<filename>backend/src/main/resources/db/migration/V1000001__create_user_table.sql
CREATE TABLE user (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
name varchar(100) not null,
external_identifier varchar(100) not null,
PRIMARY KEY (id)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1;
|
CREATE TABLE posts(
ID int NOT NULL AUTO_INCREMENT,
post varchar(222) NOT NULL,
genere varchar(10) NOT NULL,
tme varchar(255) NOT NULL,
dte varchar(255) NOT NULL,
cmts varchar(500),
PRIMARY KEY (ID)
);
|
/*MySQL - stored procedure*/
DELIMITER //
DROP PROCEDURE IF EXISTS updatenote;
CREATE PROCEDURE `updatenote`
(
IN noteid INT,
IN title VARCHAR(50),
IN body VARCHAR(65000),
IN tags VARCHAR(25)
)
BEGIN
DECLARE TID INT;
DECLARE delim CHAR;
DECLARE strt INT;
DECLARE idx INT;
DECLARE tag VARCHAR(25);
SET delim =... |
ALTER TABLE `conversation_opt`
ADD COLUMN `has_eqcq` TINYINT NOT NULL DEFAULT 0 AFTER `allow_intructor`;
|
-- MySQL Script generated by MySQL Workbench
-- Tue Dec 18 23:10:27 2018
-- 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_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ON... |
-- phpMyAdmin SQL Dump
-- version 4.5.4.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 06, 2018 at 03:28 PM
-- Server version: 5.7.11
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_S... |
<filename>DB/generateScript.sql
BEGIN TRANSACTION;
DROP TABLE IF EXISTS "api_clubleague";
CREATE TABLE IF NOT EXISTS "api_clubleague" (
"id" integer NOT NULL PRIMARY KEY AUTOINCREMENT,
"club_id" integer,
"league_id" integer,
FOREIGN KEY("league_id") REFERENCES "api_league"("id") DEFERRABLE INITIALLY DEFERRED,
FORE... |
<reponame>MinisterioPublicoRJ/api-cadg<gh_stars>1-10
SELECT aisp_codigo,
aisp_nome,
orgao_id,
nr_denuncias,
nr_cautelares,
nr_acordos_n_persecucao,
nr_arquivamentos,
nr_aberturas_vista,
max_denuncias,
max_cautelares,
max_acordos,
max_arquivamentos,
max_vistas,
perc_denuncias,
perc_cautelares,
perc_acordos,
perc_arquiva... |
CREATE VIEW [dbo].[vRooms]
AS
SELECT dbo.Bldg.Bldg_Key AS BldgKey, dbo.Room.Floor_Key AS FloorKey, dbo.Room.Room_Key AS RoomKey, dbo.Bldg.Primary_Display_Name AS BldgName, dbo.Room.Floor_Name AS FloorName,
dbo.Room.Room AS RoomNumber, dbo.Room.Room_Name AS RoomName, dbo.Room.Ro... |
ALTER TABLE testtable
ALTER COLUMN field4 SET DEFAULT 0.0;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.