sql stringlengths 6 1.05M |
|---|
/*
Query para publicar a tabela.
Esse é o lugar para:
- modificar nomes, ordem e tipos de colunas
- dar join com outras tabelas
- criar colunas extras (e.g. logs, proporções, etc.)
Qualquer coluna definida aqui deve também existir em `table_config.yaml`.
# Além disso, sinta-se à vontade para alterar alg... |
<gh_stars>0
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: pharmacy
-- ------------------------------------------------------
-- Server version 8.0.11
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RE... |
-- 8) Print the countries whose downloaded are more than the downloads from China ("CN")
select country from cw_table
group by country
having count(country) > (select count(country) from cw_table where country='CN'); |
SELECT *
FROM m_org
WHERE del_flg = '0'
<#if likeName??>
AND org_name like :likeName
</#if>
ORDER BY disp_seq |
begin;
alter table c_block add column tags text not null default '';
alter table c_block add column label text not null default '';
commit;
|
# ---------------------------------------------------------------------- #
# Script generated with: DeZign for Databases V9.0.0 #
# Target DBMS: MySQL 5 #
# Project file: Project1.dez #
# Project name: ... |
<filename>bin/apache-hive-3.1.2-bin/scripts/metastore/upgrade/derby/upgrade-2.3.0-to-3.0.0.derby.sql
version https://git-lfs.github.com/spec/v1
oid sha256:508ea721e50d9b7a2bd9547b717f8837b04175244aefeaa6dd24056953876722
size 13577
|
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 26, 2018 at 11:31 AM
-- Server version: 5.7.14
-- PHP Version: 5.6.25
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */... |
<reponame>datlmd/datlm
DROP TABLE IF EXISTS `fuel_blog_users`;
DROP TABLE IF EXISTS `fuel_blog_posts`;
DROP TABLE IF EXISTS `fuel_blog_links`;
DROP TABLE IF EXISTS `fuel_blog_comments`;
DROP TABLE IF EXISTS `fuel_blog_categories`;
DELETE FROM `fuel_permissions` WHERE `name` LIKE 'blog/%'; |
CREATE TABLE `namespace` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`created_at` int(11) NOT NULL,
`updated_at` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `namespace` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; |
ALTER TABLE ${ohdsiSchema}.output_files ADD media_type VARCHAR(255);
ALTER TABLE ${ohdsiSchema}.output_files DROP CONSTRAINT fk_sif_cca_execution;
ALTER TABLE ${ohdsiSchema}.output_files DROP COLUMN cca_execution_id;
ALTER TABLE ${ohdsiSchema}.input_files DROP CONSTRAINT fk_sof_cca_execution;
ALTER TABLE ${ohdsiSch... |
DEF oci360_in_table_before = "&&1."
DEF oci360_in_table_after = "&&2."
DEF oci360_in_table_file = "&&3."
UNDEF 1 2 3
@@&&fc_spool_start.
SET SERVEROUT ON
SPO &&oci360_in_table_file.;
DECLARE
V_TAB_B4 VARCHAR2(30) := '&&oci360_in_table_before.';
V_TAB_AF VARCHAR2(30) := '&&oci360_in_table_after.';
CURSOR L... |
<filename>src/main/resources/schema-h2.sql
-- H2
--
-- Table structure for table "customer"
--
CREATE TABLE IF NOT EXISTS "CUSTOMER" (
"ID" bigint NOT NULL,
"VER" int DEFAULT NULL,
"TM" datetime DEFAULT NULL,
"ACTIVE_AFTER" datetime DEFAULT NULL,
"ACTIVE_UNTIL" datetime DEFAULT NULL,
"LOGIN" varchar(255)... |
<reponame>trinityprog/twix_eba_2022_ge-
INSERT INTO `test_questions` (`id`, `general`, `locale`, `variant_id`, `order`, `created_at`, `updated_at`) VALUES
(1, 'Утро или вечер?', 'Таңғы уақыт па, әлде кешкі уақыт па?', 1, 0, '2022-01-27 05:06:16', '2022-01-27 08:10:42'),
(2, 'Чай или кофе?', 'Шай ма, кофе ме?', 1, 0, '2... |
<reponame>sapinheiro/aquarium-database-rails-project
-- ==========================================
-- EMPLOYEE
-- ==========================================
-- ------------------------------------------
-- Add a new employee
-- ------------------------------------------
DROP PROCEDURE IF EXISTS addEmployee;
DELIMI... |
ALTER TABLE `nets_emp_info`
CHANGE `POS_CODE` `POS_CODE` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
CHANGE `LOC_CODE` `LOC_CODE` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
CHANGE `GRP_CODE` `GRP_CODE` VARCHAR(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
CHANGE `DEPT_CODE`... |
<reponame>DataGenSoftware/Sql.Net
CREATE SYNONYM [SqlNet].[TimeOfDay] FOR [SqlNet].[DateTimeTimeOfDay];
|
create table roles (
id_role integer not null primary key,
name_role varchar(20) not null
);
create table genre (
id_genre integer not null primary key auto_increment,
name_of_genre varchar(100) not null
);
create table series (
id_series integer not null primary key,
status integer(1) not nul... |
-- Revert yabon-prono:rebuild-table-v2 from pg
BEGIN;
DROP TABLE bet, match, bookmaker, comment, "user";
COMMIT;
|
CREATE PROCEDURE
`SEQUENCER_GETSEQUENCE`(IN P_TECHNICALNAME VARCHAR(120))
MODIFIES SQL DATA SQL SECURITY INVOKER
BEGIN
DECLARE sequence INT DEFAULT 1;
START TRANSACTION;
IF NOT EXISTS (SELECT SEQ FROM SEQUENCER WHERE TECHNICALNAME = P_TECHNICALNAME) THEN
INSERT INTO SEQUENCER (TECHNICALNAME, ... |
SELECT * FROM foo', array('where' => array(Query::APPEND => array('abc = 10'))));
SELECT * FROM relatie WHERE id IN (#sub1) AND status = 1", "SELECT relatie_id FROM relatie_groep
SELECT id, description FROM `test` WHERE (`status` = 1) AND (id > 10) GROUP BY type_id HAVING SUM(qty) > 10
UPDATE phpunit_test SET descripti... |
<filename>schema.sql
-- run the below to create your database
-- createdb cinema_quest
-- psql -d cinema_quest -f schema.sql
DROP TABLE IF EXISTS movies;
CREATE TABLE movies (
id SERIAL PRIMARY KEY,
title VARCHAR(255),
overview TEXT,
thumbnail VARCHAR(255),
release_date VARCHAR(255),
vote_average VARCHAR(... |
-- phpMyAdmin SQL Dump
-- version 4.2.12deb2+deb8u1
-- http://www.phpmyadmin.net
--
-- 主機: localhost
-- 產生時間: 2016 年 04 月 12 日 15:17
-- 伺服器版本: 5.5.44-0+deb8u1
-- PHP 版本: 5.6.19-0+deb8u1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
SELECT TRIGGER_CATALOG,
TRIGGER_SCHEMA,
TRIGGER_NAME,
EVENT_MANIPULATION,
EVENT_OBJECT_CATALOG,
EVENT_OBJECT_SCHEMA,
EVENT_OBJECT_TABLE,
ACTION_ORDER,
ACTION_CONDITION,
ACTION_STATEMENT,
ACTION_ORIENTATION,
ACTION_TIMING,
ACTION_REFEREN... |
<gh_stars>1-10
CREATE TABLE child_event (
id String,
end_time Nullable(String),
start_time Nullable(String),
ticket_uri Nullable(String)
)
ENGINE = Log
|
-- file:object_address.sql ln:8 expect:true
RESET client_min_messages
|
<filename>src/SFA.DAS.EmployerIncentives.Database/Views/BusinessApplicationsDashboard.sql
CREATE VIEW [dbo].[BusinessApplicationsDashboard]
AS
select
month(PlannedStartDate) as [Planned Start Month],
year(PlannedStartDate) as [Planned Start Year],
count(distinct(iaa.IncentiveApplicationId)) as Application... |
<filename>omnichannel/commerce-platform/scripts/database-queries/Assets_Management.sql<gh_stars>0
-- PRODUCTO POR CODIGO DE INTERNET
SELECT PRODUCT_ID
FROM ATGDB_PUB.GN_PRD_ATTR
WHERE 1 = 1
AND ATTRIBUTE_NAME = 'CODIGO_INTERNET'
AND ATTRIBUTE_VALUE = '565802'
GROUP BY PRODUCT_ID
-- --------
... |
<filename>src/DML/CONSEGNA_FIXED_DML.sql
-- Consegne relative a resi (stesso corriere, cf_acquirente, codice scontrino e data arrivo successiva nel caso del reso)
INSERT INTO CONSEGNA (cod_tracc, corriere, cf_acq_cons, cod_scon_cons, data_arrivo, costi_spedizione) VALUES ('eqm728hkak', 'BRT', 'ARDGOL17J21F472A', 'jsk43... |
<gh_stars>0
CREATE TABLE IF NOT EXISTS users (
id serial NOT NULL PRIMARY KEY,
username varchar(32) NOT NULL UNIQUE,
password varchar(32) NOT NULL,
biography va... |
INVALID TEST
Disable trigger is not supported for Firebird
https://docs.liquibase.com/change-types/disable-trigger.html |
<reponame>jgillies/dbt-date<gh_stars>0
{% macro get_base_dates(start_date, end_date) %}
with date_spine as
(
{{ dbt_utils.date_spine(
datepart="day",
start_date="cast('" ~ start_date ~ "' as datetime)",
end_date="cast('" ~ end_date ~ "' as datetime)",
)
}}
)
select
d.date_day ... |
<reponame>bcgov/cas-ciip-portal
-- Verify ggircs-portal:database_functions/get_valid_applications_for_certifier on pg
begin;
select ggircs_portal_private.verify_function_not_present('ggircs_portal_private.get_valid_applications_for_certifier');
rollback;
|
<reponame>tobiasschaefer/TaskanaAdapter<filename>taskana-adapter-camunda-listener/src/main/resources/sql/oracle/taskana_outbox_schema_update_0.0.1_to_1.0.0_oracle.sql<gh_stars>1-10
-- this script updates the tables OUTBOX_SCHEMA_VERSION and event_store.
ALTER SESSION SET CURRENT_SCHEMA = %schemaName%;
INSERT INTO OUTB... |
<reponame>InsightsDev-dev/tajo
select * from (
select a.id, b.c_name, a.code from customer b
join (
select l_orderkey as id, 'lineitem' as code from lineitem
union all
select o_orderkey as id, 'order' as code from orders
) a on a.id = b.c_custkey
) c order by id, code |
-- DISCLAIMER:
-- This script is provided for educational purposes only. It is
-- NOT supported by Oracle World Wide Technical Support.
-- The script has been tested and appears to work as intended.
-- You should always run new scripts initially
-- on a test instance.
set timing off
set echo off
set lines 400 pages ... |
--
-- OpenAPI Petstore.
-- Prepared SQL queries for 'ApiResponse' definition.
--
--
-- SELECT template for table `ApiResponse`
--
SELECT `code`, `type`, `message` FROM `ApiResponse` WHERE 1;
--
-- INSERT template for table `ApiResponse`
--
INSERT INTO `ApiResponse`(`code`, `type`, `message`) VALUES (?, ?, ?);
--
--... |
<reponame>Data-Learn/SQLforBeginers<filename>SQL-101 Modules/Module 3/Lesson 25/SQL файлы/SQL код из урока 25.sql
--1) FROM
--2) ON
--3) JOIN
--4) WHERE
--5) GROUP BY
--6) WITH CUBE or WITH ROLLUP
--7) HAVING
--8) SELECT
--9) DISTINCT
--10) ORDER BY
--11) TOP
USE [AdventureWorks2019];
--Следующий SQL за... |
<gh_stars>0
CREATE TABLE Country (
primaryKey UUID NOT NULL,
Name VARCHAR(255) NOT NULL,
PRIMARY KEY (primaryKey));
CREATE TABLE Book (
primaryKey UUID NOT NULL,
Name VARCHAR(255) NOT NULL,
Capacity INT NOT NULL,
Annotation VARCHAR(255) NULL,
Agenda VARCHAR(255) NULL,
PicturesAuthor VARCHAR(2... |
<reponame>giannini5/fields
create table if not exists field (
id bigint auto_increment,
facilityId bigint not NULL,
name varchar(60) not NULL,
enabled tinyint default 1,
thirdPartyFieldId int default 0,
PRIMARY KEY (id),
unique index ux_... |
/*A few key terms in plans
An index SCAN is where SQL server reads the whole of the index looking for matches - the time this takes is proportional to the size of the index.
An index SEEK is where SQL server uses the b-tree structure of the index to seek directly to matching records (see http://mattfleming.com/node/1... |
-- phpMyAdmin SQL Dump
-- version 4.7.7
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 15 Apr 2018 pada 11.18
-- Versi server: 5.6.21
-- Versi PHP: 7.1.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_... |
<reponame>ravirdv/pyS60-SMS-Gateway
--
-- Table structure for table `accounts`
--
CREATE TABLE IF NOT EXISTS `accounts` (
`mobileno` varchar(13) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`service` varchar(8) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
`username` varchar(30) COLLATE utf8_unicode_ci DEFAULT NU... |
ALTER TABLE matches ADD COLUMN approvedBy TEXT DEFAULT NULL;
|
USE WhatIfDemoDb;
GO
CREATE TABLE [dbo].[Policies] (
[id] UNIQUEIDENTIFIER DEFAULT (newid()) NOT NULL,
[userId] NVARCHAR (255) NOT NULL,
[productId] NVARCHAR (255) NOT NULL,
[paymentAmount] DECIMAL (18, 2) NOT NULL,
[dateCreated] DATETIME NULL,
PRIMARY KEY... |
<reponame>harshalaardekar/token-master<gh_stars>1-10
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 08, 2019 at 09:00 AM
-- Server version: 10.1.32-MariaDB
-- PHP Version: 7.2.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANS... |
CREATE TABLE `TaxonAttributes` (
`taxon_id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT COMMENT 'DkIndexNumber in FileMaker',
`createdAt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updatedAt` datetime DEFAULT NULL,
`diagnose` text DEFAULT NULL COMMENT 'diagnose in FileMaker',
`forvekslingsmuligheder` text DE... |
<filename>src/test/resources/tkt3357.test_3.sql
-- tkt3357.test
--
-- execsql {
-- SELECT cc.id, cc.b_id, cc.myvalue
-- FROM (
-- SELECT a.id, a.b_id, a.myvalue
-- FROM a, b WHERE a.b_id = b.id
-- ) cc
-- LEFT OUTER JOIN b dd ON cc.b_id = dd.id
-- }
SELECT cc.id, cc.b_id, cc.myvalue
FROM (... |
CREATE TYPE [dbo].[GuidList] AS TABLE (
[ID] UNIQUEIDENTIFIER
)
|
/*
SQLyog Ultimate v12.3.1 (64 bit)
MySQL - 5.5.28 : Database - projectdb
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHE... |
CREATE FUNCTION func601() RETURNS integer
LANGUAGE plpgsql
AS $$ DECLARE val INTEGER; BEGIN val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE218);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE187);val:=(SELECT COUNT(*)INTO MYCOUNT FROM MYLARGESCHEMA.TABLE417);val:=(SELECT COUNT(*)INTO MYCOU... |
-- codd: non-destructive, no-txn
DO
$do$
BEGIN
IF NOT EXISTS (
SELECT FROM pg_catalog.pg_roles WHERE rolname = 'codd-user') THEN
CREATE USER "codd-user";
END IF;
END
$do$;
GRANT CONNECT ON DATABASE "codd-experiments" TO "codd-user";
CREATE TABLE employee (
employee_id SERIAL PRIMARY KEY
, ... |
<reponame>lz1988/stourwebcms
insert into sline_member values('1','','18682***','a3cc84a3af724e0f05b94f4fcc2e3995','','保密','0','0','','18682752879','0','','0','','1442990646','192.168.3.11','1442990647','192.168.3.11','0','0','','','','','','','','0');
insert into sline_member values('2','','18228***','8ff6adcecc3861aab... |
--test null with min(), max() function
create class t1(c1 int, c2 varchar(20));
insert into t1 values(101, 'aaa');
insert into t1 values(null, 'aaa');
insert into t1 values(null, 'aaa');
insert into t1 values(null, 'aaa');
select max(c1) from t1;
select min(c1) from t1;
drop class t1; |
<reponame>riczky/Rest-Api-Laravel-Breeze-Sanctum<filename>students.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 1192.168.127.12
-- Generation Time: Feb 13, 2022 at 12:53 PM
-- Server version: 10.4.14-MariaDB
-- PHP Version: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START ... |
<filename>data/create_user.sql
--
-- Create database user and schema for Oracle Go.
--
-- @author: hhayakawa_jp <<EMAIL>>
--
CREATE USER ORACLEGO IDENTIFIED BY ORACLEGO DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
ALTER USER ORACLEGO quota unlimited on USERS;
GRANT CONNECT, RESOURCE, CREATE TABLE, CREATE SEQUEN... |
<filename>uninstall.sql
--Uninstall
begin
/* drop old install */
begin execute immediate 'drop type o_canvas_cursos'; exception when others then null; end;
begin execute immediate 'drop type o_canvas_usuarios'; exception when others then null; end;
begin execute immediate 'drop type o_canvas_periodos_academicos... |
<reponame>flicus/demu
DROP TABLE CONFIG;
DROP TABLE SESSIONS;
DROP TABLE USAGES;
DROP TABLE SESSION_TYPE;
DROP TABLE DIAMETER_MESSAGES;
|
<gh_stars>0
USE farmacia;
-- Consultas complexas
-- Compras
SELECT * FROM compras;
-- Passo 2 > Colocar o nome do cliente nas compras
SELECT com.id, cli.nome, com.data
FROM compras AS com, clientes AS cli
WHERE com.id_clientes = cli.id;
-- Passo 3 > Produtos compras
SELECT * FROM produtos_compra;
-- Passo 4
SEL... |
-- Demonstration A
-- Step 1:
-- Switch the query window to use your copy of the AdventureWorksLT database
-- Step 2: Use implicit conversion in a query
-- Demonstrate implicit conversion from the lower type (varchar)
-- to the higher (int)
SELECT '1' + 2 AS result;
SELECT 1 + '2' AS result;
-- Step 3: Use implicit ... |
create or replace function get_id_tiempo(anio integer, mes integer) returns integer as
$$
declare
id_tiempo integer;proximo integer;
begin
id_tiempo = (select t.id_tiempo from tiempo t where t.anio = $1 and t.mes = $2);
if id_tiempo is not null then
return id_tiempo;
else
proximo = (select max(t.id_tiempo) fr... |
<filename>src/main/resources/data.sql
insert into catalog(product_id, product_name, stock, unit_price)
values('CATALOG-0001', 'Berlin', 100, 1500)
insert into catalog(product_id, product_name, stock, unit_price)
values('CATALOG-0002', 'Tokyo', 100, 900)
insert into catalog(product_id, product_na... |
<reponame>kolyaattila/information-center
create table public.Question2Quiz (
quiz_id bigint not null,
question_id bigint not null,
constraint question2quiz_quiz_id_question_id_pk PRIMARY KEY (quiz_id, question_id)
);
|
--USERS
INSERT INTO USER (USERNAME, PASSWORD, ENABLED) VALUES('user', 'password', TRUE);
INSERT INTO USER (USERNAME, PASSWORD, ENABLED) VALUES('admin', 'password', TRUE);
INSERT INTO USER (USERNAME, PASSWORD, ENABLED) VALUES('<EMAIL>', '<PASSWORD>', TRUE);
INSERT INTO USER (USERNAME, PASSWORD, ENABLED) VALUES('<EMAIL>'... |
CREATE TABLE roles (
id SERIAL PRIMARY KEY,
name VARCHAR NOT NULL
);
CREATE TYPE action_type AS ENUM ('create', 'read', 'update', 'delete');
CREATE TYPE action_modifier AS ENUM ('all', 'own');
CREATE TABLE permissions (
id SERIAL PRIMARY KEY,
role_id INTEGER REFE... |
<filename>answers/leetcode/Department Highest Salary.sql
# Write your MySQL query statement below
select d.Name Department, e1.Name Employee, e1.Salary
from Employee e1, Department d,
(select max(Salary) Salary, DepartmentId from Employee group by DepartmentId) e2
where e1.Salary = e2.Salary
and e1.DepartmentId =... |
create table conditions_clusters as
select nct_id,
max(case when substr(mesh_id,1,7) in ('F04.096','F03.080','C25','C25.100','C25.835','F03.600','C25.675','I01.880','C25.912','C25.300','C25.635','F03.900','F01.145') then 1 else 0 end) clus_0,
max(case when substr(mesh_id,1,7) in ('C02.825','C02.782','C02.800','C13.... |
--liquibase formatted sql
--changeset uk.gov.pay:insert_new_resource_types
INSERT INTO resource_type (name) VALUES ('payment'), ('card_payment');
|
<filename>setup.sql
-- create necessary tables
CREATE TABLE IF NOT EXISTS customers (
id BIGINT,
email VARCHAR(50),
name VARCHAR(50),
first_name VARCHAR(50),
last_name VARCHAR(50),
phone VARCHAR(20),
address VARCHAR(150),
city VARCHAR(150),
zip VARCHAR(20),
country VARCHAR(150),
... |
SELECT * FROM [DB_PREFIX]Page WHERE pageId = :page_id LIMIT 1; |
<gh_stars>0
insert into person(id,name,age,address) values(hibernate_sequence.nextval,'汪云飞',32,'合肥');
insert into person(id,name,age,address) values(hibernate_sequence.nextval,'xx',31,'北京');
insert into person(id,name,age,address) values(hibernate_sequence.nextval,'yy',30,'上海');
insert into person(id,name,age,address) ... |
/*
* Copyright 2018 Infosys Ltd.
*
* 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 licenses this file to You under the Apache License, Versio... |
<filename>Recommended DOQL/Infrastructure/system_profiles_summary.sql
/*
- Name: System Profiles Summary
- Purpose: Query for summary of all discovered hardware profiles.
- Date Created: 10/01/20
- Changes: 10/12/20 Updated to use new subtypes and view_device_v2 introduced in 16.19
*/
select count (*) "Quantity... |
INSERT INTO ${ohdsiSchema}.sec_permission(id, value, description) VALUES
(${ohdsiSchema}.sec_permission_id_seq.nextval, 'conceptset:*:copy-name:get', 'Get name for copying concept set');
INSERT INTO ${ohdsiSchema}.sec_role_permission(id, role_id, permission_id)
SELECT ${ohdsiSchema}.sec_role_permission_sequence.next... |
-- start_ignore
create schema functional_1_75;
set search_path to functional_1_75;
-- end_ignore
-- start_ignore
-- @author prabhd
-- @created 2012-12-05 12:00:00
-- @modified 2012-12-05 12:00:00
-- @tags dml
-- @db_name dmldb
DROP TABLE IF EXISTS dml_pt_tab;
CREATE TABLE dml_pt_tab (
i int,
x text,
c char,
... |
BEGIN;
ALTER TABLE prims ADD COLUMN VolumeDetect INTEGER NOT NULL DEFAULT 0;
COMMIT;
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Author: hp
* Created: 24 Jan, 2019
*/
update treatmentdata set department=UPPER(replace(department,' ','_'));
ALTER TABLE `... |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Dec 08, 2021 at 02:19 AM
-- Server version: 10.4.20-MariaDB
-- PHP Version: 7.4.22
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIE... |
<filename>dc_2021_updated.sql
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 02, 2021 at 05:42 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!4010... |
CREATE DATABASE stums;
USE stums;
CREATE TABLE student (
stuId VARCHAR(15) KEY NOT NULL,
stuName VARCHAR(30) NOT NULL,
stuSex ENUM ('男','女') NOT NULL,
stuAge char(7) NOT NULL,
major VARCHAR(30) NOT NULL,
minor VARCHAR(30),
politicsStatus VARCHAR(30),
stuAddress VARCHAR(50),
enterTime VARCHAR(30) NOT NULL,
de... |
<filename>sql/changes.sql<gh_stars>0
ALTER TABLE hideout.m_link_categories ADD COULMN m_user_id INT(3) NOT NULL COMMENT 'ユーザID';
ALTER TABLE hideout.m_link_categories ADD CONSTRAINT m_user_id FOREIGN KEY (m_user_id) REFERENCES m_users(m_user_id) ON DELETE CASCADE ON UPDATE CASCADE;
#ALTER TABLE hideout.m_links ADD COU... |
<filename>public/upload/termos/mbls.sql
-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb2+deb7u1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tempo de Geração: 13/12/2015 às 16:49:48
-- Versão do Servidor: 5.5.38
-- Versão do PHP: 5.5.30-1~dotdeb+7.1
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00... |
<reponame>ohoareau/libs-js
# Table: `wpc1_options`
# Approximate rows expected in table: 752
# Delete any existing table `wpc1_options`
DROP TABLE IF EXISTS `wpc1_options`;
# Table structure of table `wpc1_options`
CREATE TABLE `wpc1_options` (
`option_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`option_n... |
<filename>Database/procedures/getLoneParentOutput.sql
DROP PROCEDURE IF EXISTS getLoneParentOutput;
CREATE DEFINER=`root`@`localhost` PROCEDURE `getLoneParentOutput`(IN start_age int(2), IN end_age int(2), IN sexIn VARCHAR(25), IN locality VARCHAR(25))
/* procedure for getting lone parents
gets totalPopulation using th... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Waktu pembuatan: 05 Nov 2021 pada 15.47
-- Versi server: 5.7.34
-- Versi PHP: 7.4.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
TRUNCATE TABLE mb_event_attr;
INSERT INTO mb_event_attr (EVENT_TYPE, SEQ_NO, ASSEMBLE_TYPE, ASSEMBLE_ID, ATTR_VALUE, ASSEMBLE_RULE, COMPANY, TRAN_TIMESTAMP, TRAN_TIME) VALUES ('CLOSE_CL001', '1', 'PART', 'CHECK_ACCT_STATUS_PA', NULL, 'A', 'DCITS', NULL, NULL);
INSERT INTO mb_event_attr (EVENT_TYPE, SEQ_NO, ASSEMBLE_TYP... |
-----------------------------------------------------------ADDING role actions-------------------------------------------------------------
INSERT into EG_ROLEACTION(ROLEID,ACTIONID)
select (select id from eg_role where name='Marriage Registration Admin'), id from eg_action where name in ('CreateReligion','Search And ... |
<reponame>Bhaskers-Blu-Org2/DataInsightsAsia
--
-- Author: <NAME>
-- Date: 09/04/2018
-- Purpose: Reports database permissions
-- Reference: http://blog.matticus.net/2011/06/tsql-to-list-all-permissions-within.html
-- Version: 0.1.0
-- Disclaimer: This script is provided "as is... |
<gh_stars>1-10
-- !Ups
DELETE FROM USERS WHERE role = 'ToActivate';
ALTER TABLE USERS
ALTER COLUMN email SET NOT NULL,
ALTER COLUMN firstname SET NOT NULL,
ALTER COLUMN lastname SET NOT NULL;
-- !Downs
ALTER TABLE USERS
ALTER COLUMN email DROP NOT NULL,
ALTER COLUMN firstname DROP NOT NULL,
A... |
CREATE PROCEDURE [dbo].[sp_session_create]
@User_Agent VARCHAR(256),
@Created_By INT
AS
BEGIN
INSERT INTO [Session]
(
[User_Agent],
[Created_By],
[Created_Date],
[Updated_By],
[Updated_Date],
Is_Deleted
)
VALUES
(
@User_Agent,
@Created_By,
GETDATE(),
@Created_By,
GETDATE(),... |
<reponame>rhomicom-systems-tech-gh/Rhomicom-DB-Scripts<filename>ORACLE_SQL/RHOMICOM_TABLES/9_HOSP/083_hosp.srvs_prvdrs.sql
/* Formatted on 10/6/2014 7:36:16 PM (QP5 v5.126.903.23003) */
CREATE TABLE HOSP.SRVS_PRVDRS (PRVDR_ID NUMBER NOT NULL,
PRSN_ID NUMBER,
... |
SELECT
COALESCE(id, 1)
FROM some_table
GROUP BY COALESCE(id, 1)
|
<reponame>sy3kic/nZEDb
ALTER TABLE predb DROP md5;
ALTER TABLE predb DROP sha1; |
<gh_stars>0
-- タスクテーブルにメモカラムを追加します.
ALTER TABLE task ADD COLUMN task_note VARCHAR(256);
-- タスク履歴テーブルにメモカラムを追加します.
ALTER TABLE task_history ADD COLUMN task_note VARCHAR(256); |
CREATE TABLE schema_migrations (version varchar(255) primary key);
CREATE TABLE 'genders' (
'id' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
'name' VARCHAR(15) NOT NULL
);
CREATE TABLE 'carrers' (
'id' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
'name' VARCHAR(25) NOT NULL
);
CREATE TABLE 'countries' (
'id' INTEGE... |
<gh_stars>0
DROP DATABASE IF EXISTS mydb;
CREATE DATABASE mydb;
SHOW DATABASES;
-- OUTPUT:
-- Database
-- mydb
-- information_schema
-- mysql
-- performance_schema
-- test
|
CREATE USER postgres WITH PASSWORD '<PASSWORD>' CREATEDB;
CREATE DATABASE postgres_dev
WITH
OWNER = postgres
ENCODING = 'UTF8'
LC_COLLATE = 'en_US.utf8'
LC_CTYPE = 'en_US.utf8'
TABLESPACE = pg_default
CONNECTION LIMIT = -1;
CREATE DATABASE postgres_test
WITH
OWNER = postgres
ENC... |
<reponame>jilonghun/xxproject
USE db_auth;
BEGIN;
COMMIT;
|
<filename>components/automate-workflow-server/schema/revert/to_ids.sql
-- Revert to_ids
BEGIN;
DROP FUNCTION IF EXISTS to_ids(
p_enterprise_name enterprises.name%TYPE,
p_user_name users.name%TYPE,
p_organization_name organizations.name%TYPE,
p_project_name projects.name%TYPE,
p_pipeline_name pipelines.name%... |
<filename>Squid/src/main/webapp/resources/db/job.sql
create table job (
j_no number(5) primary key,
j_title varchar2(50 char) not null, -- 제목
j_u_id varchar2(30 char) not null, -- 아이디
j_u_name varchar2(50 char) not null, -- 이름
j_start_date Date not null,
j_end_date Date not null,
j_start_time varchar2(50 char)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.