sql stringlengths 6 1.05M |
|---|
-- tables
DROP TABLE IF EXISTS `[db_prefix]_main`;
-- admin menu
DELETE FROM `sys_menu_admin` WHERE `name` = 'Custom RSS';
-- settings
SET @iCategoryID := (SELECT `ID` FROM `sys_options_cats` WHERE `name` = 'Custom RSS' LIMIT 1);
DELETE FROM `sys_options_cats` WHERE `ID` = @iCategoryID;
DELETE FROM `sys_opti... |
<reponame>ArmondR/Employee-Tracker<filename>db/seeds.sql
INSERT INTO department(name)
VALUES
('Computer Support'),
('Information Technology'),
('Web Development'),
('Tech Sales'),
('Information Security Specialist');
INSERT INTO role (title, salary, department_id)
VALUES
('IT Manager', 110000, 1),
('Systems analyst', ... |
<filename>application/install/data/install.sql
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 50717
Source Host : localhost
Source Database : api_test_development
Target Server Type : MySQL
Target Server Ver... |
<filename>farrago/unitsql/syslib/exportImport.sql<gh_stars>10-100
-- $Id$
-- Test export/import functionality
-- export query results as tab-delimited .txt
call sys_boot.mgmt.export_query_to_file(
'select * from sales.depts order by name',
'${FARRAGO_HOME}/unitsql/syslib/depts_files/DEPTS',
true,
true,
false,
'\t',
'.... |
ALTER TABLE `preferences_options` ADD `value` TEXT NOT NULL AFTER `lu_options_id`; |
<filename>src/main/resources/database/mysql/alter_14_1_x_to_14_1_2.sql
drop index f_m_path_keys_idx on o_vfs_metadata;
drop index f_m_filename_idx on o_vfs_metadata; |
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.4
-- Dumped by pg_dump version 9.5.4
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
... |
--exceptional cases whenuseing function as an argument
--argument of string type
select time_to_sec(time_format('10:17:66', '%H:%i:%s'));
select time_to_sec(to_char(datetimetz'1111-10-55 12:23:22.111'));
--argument of time type
select time_to_sec(to_time_tz('14:20:34.333 Europe/London'));
--argument of timestamp ... |
<filename>docs/GoogleMaps/sql/store.sql
#
# Structure for the `stores` table :
#
DROP TABLE IF EXISTS `stores`;
CREATE TABLE `stores` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(60) NOT NULL,
`address` varchar(80) NOT NULL,
`lat` float(10,6) NOT NULL,
`lng` float(10,6) NOT NULL,
PR... |
CREATE TABLE Planets
(
Id INT PRIMARY KEY IDENTITY,
[Name] VARCHAR(30) NOT NULL
)
CREATE TABLE Spaceports
(
Id INT PRIMARY KEY IDENTITY,
[Name] VARCHAR(50) NOT NULL,
PlanetId INT FOREIGN KEY REFERENCES Planets(Id) NOT NULL
)
CREATE TABLE Spaceships
(
Id INT PRIMARY KEY IDENTITY,
[Name] VARCHAR(50) NOT NULL,
M... |
<reponame>digitalcredentials/lti-issuer
CREATE USER ltiadmin PASSWORD '<PASSWORD>';
CREATE DATABASE ltiissuer;
GRANT ALL PRIVILEGES ON DATABASE ltiissuer TO ltiadmin;
CREATE USER credadmin PASSWORD '<PASSWORD>';
CREATE DATABASE credadmin;
GRANT ALL PRIVILEGES ON DATABASE credadmin TO credadmin;
|
<filename>resources/migrations/16-nullable-uid.up.sql
alter table transaction_log alter column user_id drop not null;
|
CREATE OR REPLACE VIEW edw_data.v_advisor_data_s AS
SELECT
a.hk_advisor_h,
a.ldt,
nvl(lead(a.ldt, 1) over(PARTITION BY a.hk_advisor_h ORDER BY a.ldt), DATE '9999-01-01') AS ledt,
a.rsrc,
a.hashdiff,
a.created_dt,
a.changed_dt,
a.deleted_dt
FROM edw_data.advisor_data_s a; |
<gh_stars>1-10
/**
* Author: stefa
* Created: 25.07.2018
*/
CREATE VIEW `v_medical_letter` AS
SELECT `consult`.`id_consult`, `consult`.`consult_reasons`, `consult`.`remarks`, `consult`.`diagnostic`, `consult`.`recommendations`, `employee`.`first_name` AS `employee_first_name`, `employee`.`last_name` AS `employee_l... |
<filename>Database setup/Initial data for demo.sql
------------------------------------------------------------------------------
-- Initial data for BlazorVacation demo --
-- --
-- Run this SQL command before t... |
<reponame>dlunch/cardpicker<filename>server/migrations/2021-02-11-234011_add_timestamps/down.sql<gh_stars>1-10
ALTER TABLE "users" DROP COLUMN created_at;
ALTER TABLE "users" DROP COLUMN updated_at;
DROP TRIGGER set_updated_at ON "users";
ALTER TABLE "cards" DROP COLUMN created_at;
ALTER TABLE "cards" DROP COLUMN upd... |
INSERT INTO roles (role_id, role_code, role_name)
VALUES (newid(), 'AUDIT_VIEWER', 'Audit viewer');
|
<gh_stars>0
CREATE TABLE tx
( tx_hash TEXT NOT NULL PRIMARY KEY,
gas_limit BIGINT NOT NULL ,
gas_price BIGINT NOT NULL ,
gas_used BIGINT NOT NULL ,
mini_block_hash TEXT NOT NULL ,
nonce BIGINT NOT NULL ,
receiver TEXT NOT NULL ,
receiver_shard BIGINT NOT NULL ,
round BIGINT NOT NULL ,
sender TEXT ... |
SELECT cc.id,
regexp_replace(com.item, E'[\\t\\n\\r]+', ' ', 'g') AS "objcomment_s"
FROM collectionobjects_common cc
JOIN collectionobjects_common_comments com ON (com.id = cc.id AND (com.pos = 0 OR com.pos IS NULL)) |
<gh_stars>0
CREATE DATABASE bdLojaRoupas
--DROP DATABASE bdLojaRoupas
USE bdLojaRoupas
CREATE TABLE tbCliente(
codCliente INT PRIMARY KEY IDENTITY(1,1)
, nomeCliente VARCHAR(50) NOT NULL
, idadeCliente INT NOT NULL
)
CREATE TABLE tbVendedor(
codVendedor INT PRIMARY KEY IDENTITY(1,1)
, nomeVendedo... |
<reponame>shashank2811/Employee-management-system
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Apr 06, 2019 at 08:34 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 7.3.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACT... |
CREATE DATABASE IF NOT EXISTS `xpacs` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `xpacs`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64)
--
-- Host: 192.168.3.11 Database: xpacs
-- ------------------------------------------------------
-- Server version 5.7.17
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
<gh_stars>1-10
-- +goose Up
ALTER TABLE `issues` MODIFY `workflow_step` ENUM(
'AwaitingProcessing',
'AwaitingPageReview',
'ReadyForMetadataEntry',
'AwaitingMetadataReview',
'ReadyForMETSXML',
'ReadyForBatching',
'InProduction'
) DEFAULT 'AwaitingProcessing';
-- +goose Down
ALTER TABLE `issues` MODIFY `wo... |
<filename>SQL/Advanced_Select/Companies.sql
/*
Amber's conglomerate corporation just acquired some new companies. Each of the companies follows this hierarchy:
Given the table schemas below, write a query to print the company_code, founder name, total number of lead managers, total number of senior managers, total nu... |
<filename>src/test/resources/org/support/project/ormapping/gen/dao/sql/SectionDao/SectionDao_delete.sql
DELETE FROM SECTION
WHERE
SECTION_CODE = ?
;
|
<gh_stars>100-1000
-- Deploy delivery:add_description_to_phase_runs to pg
BEGIN;
ALTER TABLE phase_runs ADD COLUMN description TEXT;
COMMIT;
COMMENT ON COLUMN phase_runs.description IS
$$
A user-meaningful description of this particular phase run when a stage
consists of multiple copies of a given phase. For exampl... |
DROP PROCEDURE IF EXISTS `CreateDBLog`;
CREATE PROCEDURE `CreateDBLog` (_User TEXT, _Command TEXT, _Endpoint TEXT)
#BEGIN#
INSERT INTO DBLog (User, Command, Endpoint)
VALUES(_User, _Command, _Endpoint); |
ALTER TABLE `contact` ADD `adress` VARCHAR(200) NOT NULL AFTER `id`;
ALTER TABLE `contact` ADD `Email_Password` VARCHAR(32) NOT NULL AFTER `email`; |
SET time_zone = "+00:00";
USE fueterpl_entwicklung;
CREATE TABLE IF NOT EXISTS `AKTION` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`titel` varchar(100) NOT NULL,
`beschreibung` text,
... |
CREATE TYPE address AS (street text, city text, state char(2), zip text);
|
<reponame>zoludj/bookshelf<gh_stars>0
insert into users (id, login_name, password_hash, role_name) values (-1, 'user', 'PBKDF2WithHmacSHA256:2048:e9vXAAs/amAf2/PT/eVw2UbG6DcdtIZArf0FqMG8ClI=:UTOAQ8LsucZL3nua/RQj3VyDid3KhaSUFc5AaVI8T4A=', 'USER')
insert into users (id, login_name, password_hash, role_name) values (-2, '... |
create table if not exists user_permissions(
id serial primary key not null,
created_at timestamp not null,
updated_at timestamp not null,
deleted_at timestamp,
organization_id int not null,
user_id int not null,
modules jsonb
);
create index index_user_permission_organization_id on user_per... |
<reponame>vascoalramos/my-game-stack
DROP PROCEDURE GamesDB.uspAddGame;
GO
DROP FUNCTION GamesDB.splitArray;
GO
CREATE FUNCTION GamesDB.splitArray --This function creates a table with the split values of an array to be used on the stored procedure
(
@argSourceStr varchar(MAX) = NULL,
@argDelimiter char... |
CREATE MATERIALIZED VIEW mv_spin_tournaments_by_pools AS (
WITH
last_tournament AS (
SELECT MAX(t.f_started_stamp) AS last_tournament_stamp
FROM
t_tournament t,
t_player_in_tournament tp
WHERE
t.f_id = tp.f_tournament_id AND
t.f_tournament_type = ... |
<filename>services/flyway/sql/V1.11__usecases_status.sql
-- DROP
DROP VIEW api.usecases;
-- CREATE TABLES
CREATE TABLE public.usecase_status (
usecase integer NOT NULL,
status integer NOT NULL,
CONSTRAINT status FOREIGN KEY (status) REFERENCES public.statuses (id)
MATCH SIMPLE ON UPDATE NO ACTION O... |
<filename>content/berkas/sql/3401_1475845222.sql
INSERT INTO tweb_apbd(`rangkuman`,`berkas_id`,`lembaga_id`, `lembaga_kode`,`pemda_kode`, `wilayah_kode`,`tahun`, `rekening_kode`,`rekening`, `uraian`, `nominal`,`nominal_sebelum`, `nominal_sesudah`, `nominal_perubahan`, `nominal_persen`, `keterangan`, `created_by`, `upda... |
/*
Navicat MySQL Data Transfer
Source Server : villageHouse
Source Server Version : 50714
Source Host : 10.3.136.30:3306
Source Database : minshu
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2018-01-31 17:57:24
*/
SET FOREIGN_KEY_CHECKS=0;
... |
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
--
-- Name: users; Type: TABLE; Schema: public; Owner: regularroutes; Tablespace:
--
CREATE TABLE users (
id integer NOT NULL,
user_id character varying NOT NULL,
google_refresh_token character varying,
google_server_access_token cha... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 28-Maio-2021 às 19:03
-- Versão do servidor: 5.7.24
-- versão do PHP: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHA... |
<gh_stars>1-10
-- ================================================
-- Main script to create database and tables
-- ================================================
CREATE DATABASE [#INVEST];
USE [#INVEST];
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE Users (
id INT IDENTITY(1,1) PRIMARY KEY,
n... |
<filename>src/main/resources/db/migration/V4.60__create_parse_exercise_table.sql
CREATE TABLE ptcore.parse_exercise (
id BIGSERIAL PRIMARY KEY NOT NULL,
parse_program_id BIGINT NOT NULL,
created TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT now(),
exercise_id INT,
exercise_name VARCHAR(50),
user_... |
<filename>src/test/resources/sql/select/6fbd8189.sql
-- file:jsonb.sql ln:229 expect:true
SELECT '5'::jsonb @> '5'
|
<filename>src/test/resources/sql/insert/39c8434b.sql
-- file:numeric_big.sql ln:281 expect:true
INSERT INTO num_exp_sub VALUES (6,1,'-85243.348463177581189611503997996700083606963562092195048516462590636904726632528762075148310014258096301785271015934958953508077756073462778928355143243204489493706234410590338048641587... |
-- file:union.sql ln:27 expect:true
SELECT 1 AS two UNION SELECT 2.2 ORDER BY 1
|
CREATE TABLE ComponentToMapLoc (
Component int not null,
MapLoc int not null,
INDEX(Component),
INDEX(MapLoc)
);
|
<reponame>andypohl/kent<filename>src/hg/lib/ctgPos.sql
# ctgPos.sql was originally generated by the autoSql program, which also
# generated ctgPos.c and ctgPos.h. This creates the database representation of
# an object which can be loaded and saved from RAM in a fairly
# automatic way.
#Where a contig is inside of ... |
<filename>conf/db/migration/default/V21__clear_request.sql
DELETE FROM course_learning_outcome;
DELETE FROM student_course_map;
DELETE FROM lecturer_course_map;
DELETE FROM assessment_info;
DELETE FROM lecturer_current_subject;
DELETE FROM previous_clo_record;
DELETE FROM student_course_map;
DELETE FROM student_... |
/******************************************************************
Created June 23, 2011 by <NAME> - Interdyn AKA
This view returns a returns the details of the PO Line which has
not been received fully. It provides the details of the quantity
to be received and the value of the line item to be received in
origin... |
<filename>sql/V11.3.5__lifestyle.sql
alter table system_settings alter column value TYPE VARCHAR(1000); |
-- :oracle_price_list_base
select p.block, p.price, b.timestamp
from oracle_prices p inner join blocks b on p.block = b.height
:scope
order by p.block desc limit :limit
-- :oracle_price_predictions
select time, price
from oracle_price_predictions
order by time DESC
|
-- Add support for anomalies
CREATE TABLE "ANOMALIES"
(
"ID" NUMBER(19, 0) NOT NULL ENABLE,
"CODE" VARCHAR2(255 CHAR) NOT NULL ENABLE,
"MESSAGE" CLOB,
"CONTEXT_TYPE" VARCHAR2(255 CHAR) NOT NULL ENABLE,
"CONTEXT_NAME" VARCHAR2(255 CHAR) NOT NULL ENABLE,
"DETECT_TIME" ... |
-- Waffe-Tabelle
CREATE TABLE Waffe (WaffeID int IDENTITY (1, 1) NOT NULL PRIMARY KEY, Name nvarchar(200), TPWürfel int , TPWürfelAnzahl int, TPBonus int, AusdauerSchaden bit DEFAULT 0, TPKKSchwelle int, TPKKSchritt int, INI int, WMAT int, WMPA int, BF int, Gewicht int, Länge int, Preis float, DK nvarchar(5), Bemerku... |
<filename>src/test/resources/bvt/parser/antlr_grammers_v4_plsql/examples/union05.sql
select * from dual
union all
(
select * from dual
)
union all
(
select * from dual
)
union all
(
select * from dual
)
union all
(
select * from dual
)
union all
(
select * from dual
)
union all
(
select * from dual
)
union all
(
... |
ALTER TABLE task_config_v2 ADD spec blob;
ALTER TABLE task_config_v2 ADD api_version text;
|
<gh_stars>0
insert into watch_list_category (`id`,`name`,`description`) values(1, 'General','General');
insert into watch_list_category (`id`,`name`,`description`) values(2, 'Stolen Passport','Stolen Passport');
insert into watch_list_category (`id`,`name`,`description`) values(3, 'Lost passport','Lost passport'); |
-- Created by: <NAME>
-- <EMAIL> - 2020
USE Zobooaereo
GO
CREATE FUNCTION FN_GET_VOOS_INTERNACIONAIS ()
RETURNS @table TABLE (
dia INT,
horario INT,
companhia VARCHAR(40),
pais VARCHAR(40),
cidade VARCHAR(40)
)
AS
BEGIN
INSERT @table
SELECT DISTINCT
voo.dia as 'DIA',
... |
<filename>spotify-fix.sql<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.6.6deb5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 12, 2019 at 07:11 PM
-- Server version: 5.7.27-0ubuntu0.18.04.1
-- PHP Version: 7.2.24-0ubuntu0.18.04.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zon... |
<gh_stars>0
/*
Navicat Premium Data Transfer
Source Server : Localhost
Source Server Type : MySQL
Source Server Version : 50719
Source Host : localhost:3306
Source Schema : job_job
Target Server Type : MySQL
Target Server Version : 50719
File Encoding : 65001
Date: 0... |
create or replace table if not exists tbl_grievence_subtype
(
id int auto_increment
primary key,
stname varchar(50) not null,
tid int not null,
created_at timestamp default current_timestamp() not null,
updated_at datetime null on update current_timestamp(),
entryby int null,
updatedby int null,
isactive tiny... |
<filename>sql/query_provider_details.sql
with count_by_run as (
select
provider_url,
ts,
max(ts) over (partition by provider_url) as latest_fetch,
count(*) as found
from fetch_runs
group by provider_url, ts
)
select
provider_url,
latest_fetch,
found
from count_by_run
wh... |
<reponame>Apache0001/ProjetoFulStackEletro
-- MariaDB dump 10.17 Distrib 10.4.13-MariaDB, for Win64 (AMD64)
--
-- Host: 127.0.0.1 Database: db_fullstack
-- ------------------------------------------------------
-- Server version 10.4.13-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!4... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Oct 19, 2020 at 10:21 AM
-- Server version: 10.1.19-MariaDB
-- PHP Version: 7.0.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
<reponame>jmarca/forum_demo<filename>deploy/posts.sql
-- Deploy forum_demo:posts to pg
-- requires: forum_schema
-- requires: post_topic
BEGIN;
create table forum_example.posts (
id serial primary key,
author_id integer not null references forum_example.users(id),
headline text not ... |
<filename>porto_ecom.sql
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 23, 2020 at 05:43 PM
-- Server version: 10.4.17-MariaDB
-- PHP Version: 7.4.13
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 06 Des 2020 pada 14.21
-- Versi server: 10.1.38-MariaDB
-- Versi PHP: 7.3.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SE... |
CREATE TABLE [dbo].[KeySerials] (
[Id] INT IDENTITY (1, 1) NOT NULL,
[Active] BIT NOT NULL,
[KeySerialAssignmentId] INT NULL,
[KeyId] INT NOT NULL,
[Number] NVARCHAR (MAX) NULL,
[Status] NVARCHAR (50) NOT NULL DEFAULT 'Active',
[Gro... |
<reponame>ferifernando/kepegawaian
-- MariaDB dump 10.18 Distrib 10.4.17-MariaDB, for osx10.10 (x86_64)
--
-- Host: localhost Database: kepegawaian
-- ------------------------------------------------------
-- Server version 10.4.17-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 ... |
<reponame>ligana/Ensemble-om-SpringBoot
TRUNCATE TABLE cif_client_status;
INSERT INTO cif_client_status (CLIENT_STATUS, CLIENT_STATUS_DESC, BAD_CLIENT_IND, COMPANY, TRAN_TIMESTAMP, TRAN_TIME) VALUES ('01', '潜在客户', 'N', 'DCITS', NULL, NULL);
INSERT INTO cif_client_status (CLIENT_STATUS, CLIENT_STATUS_DESC, BAD_CLIENT_IN... |
<filename>Project Code/DB/docapp.sql
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 26, 2019 at 10:49 PM
-- Server version: 10.1.37-MariaDB
-- PHP Version: 5.6.39
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET tim... |
<gh_stars>10-100
--DROP PROC uspComSelGameEventMember
CREATE PROC uspComSelGameEventMember
@GameEventMemberID NVARCHAR(MAX)
, @MemberID NVARCHAR(MAX)
AS
select GameEventMemberID, eventID, MemberID, sCol1, sCol2, sCol3, sCol4, sCol5, sCol6, sCol7, sCol8, sCol9, sCol10 from GameEventMember with(nolock)
where MemberID li... |
IF NOT EXISTS(SELECT *
FROM sysobjects
WHERE Name = 'spo_users')
BEGIN
CREATE TABLE spo_users
(
user_id INT PRIMARY KEY IDENTITY,
user_email VARCHAR(50),
user_nick VARCHAR(100),
user_password VARCHAR(200)... |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
CREATE TABLE users (
id VARCHAR(20) NOT NULL PRIMARY KEY,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL DEFAULT NULL,
name VAR... |
ALTER TABLE ast_daily ADD COLUMN hazardous int(1) NOT NULL; |
ALTER TABLE Tweets DROP COLUMN Likes; |
CREATE TABLE `chinese_poetry_shi` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',
`author` varchar(50) DEFAULT NULL COMMENT '作者',
`dynasty` varchar(10) DEFAULT NULL COMMENT '朝代',
`paragraphs` text COMMENT '段落',
`title` varchar(300) DEFAULT NULL COMMENT '标题',
`create_time` datetime DEFAULT NULL ON UPDAT... |
<filename>database/functions/GetUserInfo.sql
-- FUNCTION: unemployment_service."GetUserInfo"(integer)
-- DROP FUNCTION unemployment_service."GetUserInfo"(integer);
CREATE OR REPLACE FUNCTION unemployment_service."GetUserInfo"(
_id_case integer)
RETURNS json
LANGUAGE 'sql'
COST 100
VOLATILE
AS $BODY... |
select min(get_json_object(hive_json.json, '$.User.Id')), max(get_json_object(hive_json.json, '$.User.Id')),min(get_json_object(hive_json.json, '$.User.Name')),max(get_json_object(hive_json.json, '$.User.Name')),min(cast(get_json_object(hive_json.json, '$.User.Orders.OrderPrice[0]') as double)),min(cast(get_json_object... |
<reponame>photogamerun/weiwodb<gh_stars>1-10
-- database: presto; groups: join; tables: nation, region, part
SELECT p_partkey,
n_name,
r_name
FROM nation,
region
JOIN part
ON r_regionkey = p_partkey
WHERE n_nationkey = r_regionkey
|
--5. 춘 기술대학교의 재수생 입학자를 구하려고 한다.
-- 어떻게 찾아낼 것인가? 이때 19살에 입학하면 재수하지 않은 것으로 간주한다.
-- 입학일자 - 생년월일(주민번호)
-- 1) 학생의 생년월일을 날짜형식으로 구해보자.
--SUBSTR(STUDENT_SSN,1,6)=> 학생의 주민번호(STUDENT_SSN)에서 1~6번째에 해당하는 부분문자열 추출.
--TO_DATE(생년월일, 'RRMMDD')
SELECT TO_DATE(SUBSTR(STUDENT_SSN,1,6),'RRMMDD') 생년월일
FROM TB_STUDENT;
-- 2) 학생의 입학했을 때 당... |
<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 01-Maio-2021 às 04:32
-- Versão do servidor: 10.4.18-MariaDB
-- versão do PHP: 7.3.27
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
<filename>QikkDB.BenchmarkUtility/ci_queries.sql
SELECT cab_type, COUNT(*) FROM trips GROUP BY cab_type ORDER BY cab_type;
40
SELECT passenger_count, AVG(total_amount) FROM trips GROUP BY passenger_count ORDER BY passenger_count;
85
SELECT passenger_count, YEAR(pickup_datetime) AS pickup_year, COUNT(*) FROM trips GROUP... |
<reponame>M0WA/jobcenter
CREATE OR REPLACE FUNCTION jobcenter.is_action(integer)
RETURNS boolean
LANGUAGE sql
SET search_path TO jobcenter, pg_catalog, pg_temp
AS $function$ select exists ( select 1 from actions where action_id = $1 and type = 'action' ); $function$
|
<reponame>agungdhewe/oss<filename>apps/finact/master/agingmodel/agingmodel.sql
-- SET FOREIGN_KEY_CHECKS=0;
-- drop table if exists `mst_agingmodel`;
CREATE TABLE `mst_agingmodel` (
`agingmodel_id` varchar(2) NOT NULL ,
`agingmodel_name` varchar(30) ,
`agingmodel_descr` varchar(90) ,
`_createby` va... |
<reponame>bradson85/PASCAL
CREATE DATABASE IF NOT EXISTS formassess;
USE formassess;
CREATE TABLE IF NOT EXISTS admins (
ID int NOT NULL AUTO_INCREMENT,
name varchar(50),
email varchar(50) NOT NULL,
password char(128) NOT NULL,
PRIMARY KEY(ID)
);
CREATE TABLE IF NOT EXISTS classes (
ID int N... |
<gh_stars>1-10
--+ holdcas on;
set system parameters 'dont_reuse_heap_file=yes';
create table tbl (c varchar (22) not null);
create index i_tbl_c on tbl (c);
insert tbl values ('%');
insert tbl values ('%');
insert tbl values ('\\');
insert tbl values ('\\');
set system parameters 'compat_mode=mysql';
select * from t... |
-- @testpoint:opengauss关键字character_set_name(非保留),作为字段数据类型(合理报错)
--前置条件
drop table if exists character_set_name_test cascade;
--关键字不带引号-合理报错
create table character_set_name_test(id int,name character_set_name);
--关键字带双引号-合理报错
create table character_set_name_test(id int,name "character_set_name");
--关键字带单引号-合理报错
cre... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jan 30, 2021 at 04:23 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
/*
sistema de elecciones
-------------------------------------------
clave oracle 11g: root user: system
-------------------------------------------
database name: eleccionesdb
username : eleccionesdb
clave:root
------------------------------------------
*/
--------------------------------------------------------
-- ... |
<filename>public/assets/migrations/2020_09_17_171440_add_facility_types.sql
INSERT INTO `facility_types` (`Name`) VALUES ('Level 4')//
INSERT INTO `facility_types` (`Name`) VALUES ('Level 5')//
INSERT INTO `facility_types` (`Name`) VALUES ('DICE')// |
<reponame>VasilijP/EA_SSSP_Charts
-- Test finished
INSERT INTO result(alg,vertcount,edgecount,elenadd,conn,task,cycles,batchname,result)
VALUES('dijkstraheapgeom',
5000,
396822,
25,
80,
... |
<reponame>Chanran/dongfumingguiyuan<gh_stars>0
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2016-03-17 21:29:07
-- 服务器版本: 5.5.47-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40... |
/*
IF EXISTS (SELECT name FROM sysobjects WHERE (name = 'DataExplorerNodeEvaluation_MemberService_Execute' AND type = 'P'))
DROP PROCEDURE dal.DataExplorerNodeEvaluation_MemberService_Execute
GO
*/
CREATE PROCEDURE [dal].[DataExplorerNodeEvaluation_MemberService_Execute]
/* STORED PROCEDURE - INPUTS (BEG... |
<reponame>MohsinGhani/library-project-on-codeigniter
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Nov 25, 2016 at 10:28 AM
-- Server version: 5.5.8
-- PHP Version: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CH... |
<reponame>RollingSoftware/L2J_HighFive_Hardcore
UPDATE character_quests SET name='Q00023_LidiasHeart' WHERE name='23_LidiasHeart'; |
create table users (
id integer not null primary key,
name varchar not null,
email varchar not null,
password_hash bigint not null
);
create view user_infos as select id, name, email from users;
create table posts (
id integer not null primary key,
user_id integer not null,
created bigint ... |
-- *******************************************************************************************
-- IMPORTANT NOTE: When making updates to this schema, please increment the version number!
-- *******************************************************************************************
CREATE VIEW LocalSchemaVersion AS
SELE... |
/*
SQL 脚本中多行注释
*/
-- Kudu表:tbl_transport_tool
CREATE EXTERNAL TABLE `tbl_transport_tool` STORED AS KUDU
TBLPROPERTIES(
'kudu.table_name' = 'tbl_transport_tool',
'kudu.master_addresses' = 'node2.itcast.cn:7051') ;
-- Kudu表:tbl_dot_transport_tool
CREATE EXTERNAL TABLE `tbl_dot_transport_tool` STORED AS KUD... |
UPDATE
`users`
SET
`id` = `uuid`; |
<reponame>Grumgog/ForumSystem
drop database if exists forumsystems;
create database if not exists forumsystems;
use forumsystems;
create table Forum_metainfo(
keyv varchar(50) primary key,
valuev varchar(50)
);
create table forums (
forum_name varchar(50) primary key,
description varchar(250)
);
create ta... |
/* 262. Университетска база данни */
CREATE SCHEMA universitydb;
USE universitydb;
CREATE TABLE majors(
major_id INT(11),
name VARCHAR(50) NOT NULL,
PRIMARY KEY(major_id)
);
CREATE TABLE subjects(
subject_id INT(11),
subject_name VARCHAR(50) NOT NULL,
PRIMARY KEY(subject_id)
);
CREATE TABLE student... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.