sql
stringlengths
6
1.05M
<reponame>nPelvin/seabums drop table if exists projects; CREATE TABLE projects ( id SERIAL PRIMARY KEY, number VARCHAR(30) NOT NULL, accessories VARCHAR(30) DEFAULT '_null', background VARCHAR(30) DEFAULT '_null', clothing VARCHAR(30) DEFAULT '_null', earrings VARCHAR(30) DEFAULT '_null', eyes VARCHAR(30) DEFAULT '_nu...
<filename>fbwiki/mediawiki/maintenance/archives/patch-comment-table.sql -- -- patch-comment-table.sql -- -- T166732. Add a `comment` table. CREATE TABLE /*_*/comment ( comment_id bigint unsigned NOT NULL PRIMARY KEY AUTO_INCREMENT, comment_hash INT NOT NULL, comment_text BLOB NOT NULL, comment_data BLOB ) /*$w...
SELECT key FROM knapsack WHERE layer = ?;
<reponame>anubra266/codebase --! Previous: sha1:949cf8168d23a02420a0a4daf6411631eba41a1e --! Hash: sha1:4f7e0984f12408f072d5eb767b2e3cc5c4f99c47 -- Enter migration here ALTER TABLE matters DROP COLUMN IF EXISTS slug; ALTER TABLE questions DROP COLUMN IF EXISTS slug; DROP DOMAIN IF EXISTS slug; CREATE DOMAIN slug AS ...
<gh_stars>0 version https://git-lfs.github.com/spec/v1 oid sha256:d72f88057f6492c3d2deade01d8f17cfb52a56c097d4cbfaf17ab18718069395 size 559
<gh_stars>1-10 DROP TABLE IF EXISTS feedback_requests; CREATE TABLE feedback_requests ( id varchar PRIMARY KEY, creatorId varchar REFERENCES member_profile(id), requesteeId varchar REFERENCES member_profile(id), recipientId varchar REFERENCES member_profile(id), templateId varchar, sendDate date, dueDate...
<gh_stars>100-1000 select department_id, last_name, salary from employees x where salary > (select avg(salary) from employees where x.department_id = department_id) order by department_id
/* SQLyog Ultimate v11.11 (32 bit) MySQL - 5.5.5-10.1.26-MariaDB : Database - yellowfood ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_...
<filename>target/classes/db/specific/postgres/V2__Add_date.sql INSERT INTO пользователи(имя_пользователя, пароль_пользователя, роль, доступ) VALUES ('сотрудник', 'user', 'ROLE_USER', true), ('админ', 'admin', 'ROLE_ADMIN', true); INSERT INTO операции(вид_операции) VALUES ('Приход'),('Возврат'); INSERT INTO мат_ответс...
CREATE TABLE `de30` ( `date` bigint(13) NOT NULL, `ctm` varchar(45) NOT NULL, `ctmString` varchar(45) NOT NULL, `open` decimal(10,5) NOT NULL, `high` decimal(10,5) NOT NULL, `low` decimal(10,5) NOT NULL, `close` decimal(10,5) NOT NULL, `volume` decimal(10,5) NOT NULL, `period` int(11) NOT NULL, PRIM...
-- Install the UUID extension for generating random primary keys CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -- Create a locations table CREATE TABLE location ( id uuid DEFAULT uuid_generate_v4(), name VARCHAR(250) NOT NULL, PRIMARY KEY (id) ); -- CREATE a Vendor table CREATE TABLE vendor ( id uuid DEFAULT u...
<gh_stars>0 -- CreateEnum CREATE TYPE "Role" AS ENUM ('USER', 'THEME_MANAGER'); -- CreateTable CREATE TABLE "Theme" ( "id" SERIAL NOT NULL, "name" VARCHAR(255) NOT NULL, "icon" VARCHAR(4096) NOT NULL, "data" JSONB NOT NULL, "dark" BOOLEAN NOT NULL DEFAULT false, PRIMARY KEY ("id") ); -- Creat...
CREATE TABLE `projeto`.`arquivos` ( `Codigo` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Codigo', `NmArquivo` VARCHAR( 150 ) NOT NULL COMMENT 'nome original', `Descricao` VARCHAR( 200 ) NULL COMMENT 'descrição do arquivo', `Arquivo` LONGBLOB NOT NULL COMMENT 'dados do arquivo', `Tipo` VARCHAR( 15 )...
<gh_stars>1-10 CREATE OR REPLACE FUNCTION pgevents_table_alter_event() RETURNS event_trigger AS $$ DECLARE rec RECORD; BEGIN FOR rec IN SELECT * FROM pg_event_trigger_ddl_commands() LOOP PERFORM pg_notify('pgevents_table_alter', json_build_object('classid', rec.classid, 'objid', rec.objid, 'objs...
IF EXISTS(SELECT * FROM sys.objects WHERE schema_id = 1 AND type = 'P' AND name = 'sp_ImportAdded') DROP PROCEDURE sp_ImportAdded GO
update oauth_service set name = 'Manage your account details', description = '' where code = 'DETAILS'; update oauth_service set name = 'Manage user accounts', description = '' where code = 'USERADMIN'; update oauth_service set name = 'Digital Categorisation Service' where code = 'CATTOOL';
<gh_stars>10-100 -- file:jsonb.sql ln:622 expect:true SELECT rec FROM jsonb_populate_record(NULL::jsbrec, '{"rec": 123}') q
<filename>src/test/resources/sql/insert/88541c7d.sql -- file:numeric_big.sql ln:395 expect:true INSERT INTO num_exp_div VALUES (8,9,'154.875085756903716715488911525453064308758123952566428258639786597308109810869086867746263482721081985848551254298524280231489145092826397833394044637104667137816928932471315095067524966...
<gh_stars>1-10 DROP DATABASE IF EXISTS techBlog_db; CREATE DATABASE techBlog_db;
\. ./../../current_mysql/5.1.1/dml/KC_DML_02_KRACOEUS-6389_00SD.sql commit; exit
<filename>packages/intranet-invoices/sql/postgresql/intranet-invoices-create.sql<gh_stars>0 -- /package/intranet-invoices/sql/postgresql/intranet-invoices-create.sql -- -- Copyright (c) 2003-2008 ]project-open[ -- -- All rights reserved. Please check -- http://www.project-open.com/license/ for details. -- -- @author <E...
<gh_stars>0 WITH Products AS (SELECT -- Product art.Description AS body_html, art.Picture ...
<filename>src/main/resources/db/migration/V25__add_wtime_to_messages.sql alter table hook.invoicing_queue add column IF NOT EXISTS wtime TIMESTAMP WITHOUT TIME ZONE NOT NULL DEFAULT (now() at time zone 'utc'); create index IF NOT EXISTS invoicing_queue_wtime_idx on hook.invoicing_queue(wtime); alter table hook.custome...
alter table RequestInfo add priority int not null; ALTER TABLE ProcessInstanceLog ADD processType int not null; update ProcessInstanceLog set processType = 1; update RequestInfo set priority = 5;
CREATE TABLE `recyclebin` ( `id` int NOT NULL AUTO_INCREMENT, `unumber` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '账号', `upassword` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '密码', `name` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ...
<filename>IQ.Schemas.Metadata/Views/vDataType.sql create view Metadata.vDataType as select t.user_type_id as DataTypeId, t.name as DataTypeName, d.PropertyValue as Description, t.schema_id as SchemaId, s.SchemaName, m.BclTypeName as MappedBclType, m.SqlDbTypeEnum as MappedSqlDbTypeEnum, t.max_length ...
<reponame>aravi5/drill-test-framework select count(distinct c_integer), sum(c_integer), round(avg(c_integer)) from alltypes_with_nulls group by c_varchar order by c_varchar;
CREATE OR REPLACE VIEW detail_users AS SELECT u.id, u.username, uw.website_id, u.person_id, u.created_by_id, cu.username AS created_by, u.updated_by_id, u.created_on, u.updated_on, uu.username AS updated_by, p.surname, p.first_name, p.surname || COALESCE(', ' || p.first_name, '') as person_name FROM users u...
<gh_stars>1-10 ALTER TABLE identity ADD creator_id CHAR(36) NULL; ALTER TABLE identity ADD CONSTRAINT identity_creator_fk FOREIGN KEY (creator_id) REFERENCES identity ON DELETE CASCADE ON UPDATE SET NULL;
CREATE TABLE `book` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键Id', `user_id` int(11) NOT NULL COMMENT '用户Id', `type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '目标类型(1 商机 )', `target_id` int(11) NOT NULL DEFAULT '0' COMMENT '目标Id', `reason` varchar(200) DEFAULT NULL COMMENT '原因', `description` varchar(...
-- -- Vehicles on M routes -- off-route in the last 15 minutes -- SELECT bus.route_id, bus.time, bus.geom FROM route_geofences AS route JOIN mta AS bus ON (route.route_id = bus.route_id) WHERE bus.time > now() - interval '15 minutes' AND bus.route_id like 'M%' AND NOT st_within(bus.geom, route.geo...
DROP DATABASE IF EXISTS gge01h7hona8s5lt; CREATE DATABASE gge01h7hona8s5lt;
<reponame>zionyun/cubrid-testcases<filename>sql/_28_features_930/issue_11399_hash_agg/hash_agg_for_prepare/cases/hash_agg_for_prepare.sql --+ holdcas on; drop table if exists t1; create table t1(a int, b double, c char(10)); insert into t1 values(1,777,'cc'); insert into t1 values(2,3377,'cd'); insert into t1 values(3...
<filename>src/include/catalog/upgrade_sql/upgrade_catalog_otherdb/upgrade_catalog_otherdb_92_383.sql --add gs_encrypted_proc SET LOCAL inplace_upgrade_next_system_object_oids = IUO_CATALOG, false, true, 9750, 9753, 0, 0; CREATE TABLE IF NOT EXISTS pg_catalog.gs_encrypted_proc ( func_id Oid NOCOMPRESS NOT NULL, ...
<reponame>nfMalde/Ren.CMS.NET<filename>Ren.CMS.Net/Source/Ren.CMS.Net-Modules/Ren.CMS.Net.Installer/InstallModule/Areas/Installer/Data/nfcms_Content_Tags.Table.sql INSERT INTO ren_cms_Content_Tags (contentType, enableBrowsing, tagName, tagNameSEO) VALUES( 'eNews', '1', 'PC', 'PC') INSERT INTO ren_cms_Content_Tags (cont...
<reponame>mtan5/boost1.0 BEGIN SELECT COUNT(*) FROM `tbl_member_info` WHERE upline_id=mbr_id INTO @downline_count; IF @downline_count > 0 THEN CREATE TEMPORARY TABLE output_downline_members (id INT(4), first_name VARCHAR(64), last_name VARCHAR(64), mid_name VARCHAR(64), code VARCHAR(24), upline_id INT(4)) AS (SELE...
-- Completed successfully SELECT N AS 'Node', CASE WHEN t1.P IS NULL THEN 'Root' WHEN t2.num_children = 2 THEN 'Inner' ELSE 'Leaf' END AS 'Type' FROM BST t1 LEFT JOIN ( SELECT P, COUNT(N) AS num_children FROM BST t1 ...
<filename>Database/report/Stored Procedures/CourseAttendee.sql CREATE PROCEDURE [report].[CourseAttendee] @SkolenieID VARCHAR(MAX) = NULL, @OrganizaciaID VARCHAR(MAX) = NULL, @UskutocneneOD DATETIME = NULL, @UskutocneneDO DATETIME = NULL AS --DECLARE -- @SkolenieID INT = NULL SELECT s.[Id] ,s.[Reference] ,s.[...
/* * Write a PL/SQL code to raise an exception to display the message * “ This employee is not entitled to get the raise in salary”. * (The employee is eligible to get the raise if his/her designation is ‘CLERK’ or ’SALESMAN’). */ SET SERVEROUTPUT ON; SET VERIFY OFF; DECLARE e_job employees.job%TY...
<filename>src/schema/iame_rpc/api_keys.sql<gh_stars>1-10 DROP TABLE IF EXISTS `api_keys`; CREATE TABLE `api_keys` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) NOT NULL, `api_key` varchar(32) NOT NULL, `status` enum('active','suspended') NOT NULL, `creation_date` timestamp NOT NULL DE...
<gh_stars>1-10 CREATE OR REPLACE FUNCTION meta.create_insert_triggers() RETURNS VOID AS $BODY$ BEGIN PERFORM meta.execute_dynamic_sql( CONCAT('CREATE TRIGGER ', e.entity_name, '_v1_insert', E'\n', E'\t', 'INSTEAD OF INSERT', E'\n', E'\t', 'ON ', e.schema_name, '.'...
CREATE TABLE IF NOT EXISTS staff ( id SERIAL, name VARCHAR(60) NOT NULL, email VARCHAR(254) NOT NULL, status BOOLEAN NOT NULL, registration DATE NOT NULL );
<filename>platypus-js-datamodel/src/test/resources/queries/multiple primary keys asterisk.sql /** * * @author mg * @name multiple_primary_keys_asterisk */ SELECT * FROM PUBLIC.MTD_MDCHNGLOG T_MTD_MDCHNGLOG_1, PUBLIC.MTD_ENTITIES T_MTD_ENTITIES
<reponame>pcjone/cool<gh_stars>1-10 /* Navicat Premium Data Transfer Source Server : 本地 Source Server Type : MySQL Source Server Version : 50716 Source Host : localhost:3306 Source Schema : cool Target Server Type : MySQL Target Server Version : 50716 File Encoding : 6...
<filename>src/main/resources/db/migrations/postgresql/V2__conversion_factor_unique_category_id_and_target_unit.sql ALTER TABLE ONLY conversion_factor ADD CONSTRAINT conversion_factor_cat_id_and_target_unit_unique UNIQUE(conversion_category_id, target_unit);
<gh_stars>10-100 alter table "public"."service_departements" drop constraint "service_departements_service_id_departement_code_key";
ALTER TABLE pages DROP COLUMN order_number; DROP INDEX pages_order_number_uniqueness;
<reponame>lintzc/GPDB -- @description function_in_select_notable_3.sql -- @db_name functionproperty -- @author tungs1 -- @modified 2013-04-03 12:00:00 -- @created 2013-04-03 12:00:00 -- @tags functionProperties SELECT func1_sql_int_vol(5) order by 1;
INSERT INTO MigrationHistory ( MajorVersion, MinorVersion, FileNumber, Comment, DateApplied ) VALUES ( '01', '01', '0004', '0004', NOW() ); INSERT INTO Users ( UserName, Pass, Adm, Token, RegDate) VALUES ( 'admin', 'admin', True, 'admin', NOW() );
drop table if exists target; drop table if exists source_tbl; create table target(a int, b char(10)); create table source_tbl( noneed1 datetime default SYS_DATETIME, name char(20), id string, noneed2 bigint not null, edate date, email varchar, noneed3 sequence(ch...
<filename>config/scripts/schema/migrations/2013-05-16 - object model for small group teaching.sql create table SmallGroupSet ( id nvarchar2(255) not null, module_id nvarchar2(255) not null, academicYear number(4,0) not null, name nvarchar2(255), archived number(1, 0) default 0, deleted number(1, 0) default 0, gr...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 13, 2021 at 03:30 AM -- Server version: 10.4.17-MariaDB -- PHP Version: 7.3.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
<filename>database/migrations/1615559538570_init/up.sql CREATE EXTENSION IF NOT EXISTS pgcrypto; CREATE EXTENSION IF NOT EXISTS pg_trgm; CREATE TABLE public.applications ( id uuid DEFAULT public.gen_random_uuid() NOT NULL, created_at timestamp with time zone DEFAULT now() NOT NULL, updated_at timestamp with...
<filename>migrations/schema.sql -- MySQL dump 10.16 Distrib 10.1.26-MariaDB, for Linux (x86_64) -- -- ------------------------------------------------------ -- Server version 10.1.21-MariaDB-1~jessie /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_...
<reponame>NaufalRivaldi/bayu<filename>db_RumahSakit.sql -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 22, 2019 at 04:27 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TR...
# tblFerroviaRodanteFaixaNumerica # # DESC: Tabela de armazenamento das faixas numéricas das ferrovias # TODO: - # NOTES: - # DROP TABLE IF EXISTS tblFerroviaRodanteFaixaNumerica; CREATE TABLE tblFerroviaRodanteFaixaNumerica ( CodFerroviaRodanteFaixaNum INT(8) NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT 'Códig...
<gh_stars>0 use LMPlatform ALTER TABLE LecturesScheduleVisitings ALTER COLUMN StartTime time null go ALTER TABLE LecturesScheduleVisitings ALTER COLUMN EndTime time null
USE tempdb CREATE TABLE #GuidDemo (ID UNIQUEIDENTIFIER, Value VARCHAR(20)) GO DECLARE @i INT = 0 WHILE @i < 100000 BEGIN INSERT INTO #GuidDemo (ID, Value) VALUES (NEWID(), 'SampleValue') SET @i = @i+1 END SELECT TOP (1) * FROM #GuidDemo CREATE TABLE #IDDemo (ID INT IDENTITY, Value VARCHAR(20)) GO DECLARE @i INT =...
/* -- Query: SELECT * FROM myfinance.posts LIMIT 0, 1000 -- Date: 2021-11-11 06:55 */ INSERT INTO `` (`id`,`title`,`amount`,`transaction_type`,`category`,`account_name`,`created_at`,`updated_at`) VALUES (1,'Netflix',11.76,'debit','Movies & DVDs','Platinum Card','2021-11-10 21:56:03','2021-11-10 21:56:03'); INSERT INTO...
-- Dimensjonstabeller create table sektor ( kode varchar primary key, navn varchar(255) not null ); create table naring ( kode varchar primary key, navn varchar(255) not null ); -- Statistikktabeller create table sykefravar_statistikk_land ( id serial primary key, arstall smallint not null, kvartal sma...
CREATE DATABASE CAMBIO; USE CAMBIO; /*Estrutura do BD0*/ CREATE TABLE USUARIO( id_usuario INT NOT NULL AUTO_INCREMENT, nome VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, senha VARCHAR(255) NOT NULL, moeda_favorita VARCHAR(255) NOT NULL DEFAULT '', id_moeda INT NOT NULL, PRIMARY KEY(id_usuario) ); CREATE T...
CREATE TABLE subdivision_RO (id VARCHAR(6) NOT NULL, name VARCHAR(255), level VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "subdivision_RO" ("id", "name", "level") VALUES (E'RO-AR', E'Арад', E'county'); INSERT INTO "subdivision_RO" ("id", "name", "level") VALUES (E'RO-AG', E'Арг', E'county'); INSERT INTO "subdi...
CREATE TABLE `restaurant_change` ( `id_restaurant_change` int(11) unsigned NOT NULL AUTO_INCREMENT, `id_restaurant_change_set` int(10) unsigned DEFAULT NULL, `field` varchar(255) DEFAULT NULL, `old_value` varchar(255) DEFAULT NULL, `new_value` varchar(255) DEFAULT NULL, PRIMARY KEY (`id_restaurant_change`),...
CREATE DATABASE dbtree DEFAULT CHARACTER SET utf8mb4 DEFAULT COLLATE utf8_general_ci;
<gh_stars>10-100 SELECT buildyear ,price ,downpayment ,rooms ,"size" ,lotsize ,street ,daysforsale ,isactive FROM recent_boligs WHERE daysforsale > 0 AND zipcode=2650 AND rooms > 3 AND size > 112 AND price < 4.6 * 1000000 ORDER BY price DESC
-- AlterEnum ALTER TYPE "OrderState" ADD VALUE 'ORDER_CANCELLING';
<filename>web-sample/web-sample-create.sql CREATE TABLE `test`.`sample_data` ( `id` INT NOT NULL AUTO_INCREMENT, `greeting` VARCHAR(255) NULL, `usage` VARCHAR(45) NULL, `date_created` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, `date_modified` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIM...
<filename>gemfirexd/tools/src/testing/java/org/apache/derbyTesting/functionTests/tests/store/longColumn.sql -- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ...
{% snapshot snap_99 %} {{ config( target_database=database, target_schema=schema, strategy='timestamp', unique_key='num', updated_at='snap_99_updated_at', ) }} select *, current_timestamp as snap_99_updated_at from {{ ref('model_99') }} {% endsnapshot %}
CREATE OR REPLACE FUNCTION public.search_users(search text) RETURNS SETOF users LANGUAGE sql STABLE AS $function$ SELECT * FROM users WHERE search IS NULL OR f_unaccent(search) <% f_unaccent(CONCAT_WS(' ', nom, prenom, email, id)) ORDER BY CASE WHEN(search <> id::text) THEN 1 ELSE 2 END D...
select stream_name, stream_arn, stream_status, encryption_type, key_id, retention_period_hours, account_id, partition, region from aws.aws_kinesis_stream where stream_name = '{{ resourceName }}';
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50505 Source Host : 127.0.0.1:3306 Source Database : yzw Target Server Type : MYSQL Target Server Version : 50505 File Encoding : 65001 Date: 2017-07-21 08:55:34 */ SET FOREIGN_KEY_CHECKS=...
DROP DATABASE IF EXISTS codegigs_db; CREATE DATABASE codegigs_db; USE codegigs_db; CREATE TABLE gigs ( id INT NOT NULL AUTO_INCREMENT, title VARCHAR(200), technologies VARCHAR(200), budget VARCHAR(20), description TEXT, contact_email VARCHAR(200), createdAt TIMESTAMP NOT NULL, updatedAt...
<filename>db_tables_for_loading/PANTRY_DB_PARTIAL.sql -- MySQL dump 10.13 Distrib 8.0.14, for Win64 (x86_64) -- -- Host: localhost Database: digital_pantry -- ------------------------------------------------------ -- Server version 8.0.13 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 S...
INSERT INTO contacts (first_name, last_name) VALUES ('Jared', 'Grippe'), ('Tanner', 'Welsh'), ('NeEddra', 'James') ;
DROP MATERIALIZED VIEW IF EXISTS mfl_gis_drilldown; CREATE MATERIALIZED VIEW mfl_gis_drilldown AS SELECT mfl_gis_facilitycoordinates.id AS id, st_x(mfl_gis_facilitycoordinates.coordinates) AS lat, st_y(mfl_gis_facilitycoordinates.coordinates) AS lng, facilities_facility.name, common_county.code AS...
<gh_stars>10-100 -- file:create_table.sql ln:150 expect:true CREATE TABLE b_star ( b text ) INHERITS (a_star)
<reponame>MasayukiOzawa/SQLUtil DROP TABLE IF EXISTS #login_event GO CREATE TABLE #login_event( timestamp_utc datetime2(3) NOT NULL, object_name nvarchar(120), module_guid uniqueidentifier, package_guid uniqueidentifier, event_data xml, database_name varchar(50) NOT NULL, file_name nvarchar(520), file_offset b...
<reponame>FedorUporov/gridgain -- Copyright 2004-2019 H2 Group. Multiple-Licensed under the MPL 2.0, -- and the EPL 1.0 (http://h2database.com/html/license.html). -- Initial Developer: H2 Group -- SELECT LENGTH(CAST(RANDOM_UUID() AS VARCHAR)); >> 36 SELECT RANDOM_UUID() = RANDOM_UUID(); >> FALSE SELECT NEWID(); > ex...
SELECT * FROM zdb_tally('so_posts', 'owner_display_name', '^.*', '', 10, 'count');
<reponame>InsightsDev-dev/tajo select distinct id, name, age, gender from people
<gh_stars>1000+ ALTER TABLE users ADD COLUMN city TEXT;
<gh_stars>10-100 DROP TABLE subscriptions_exclude_users;
-- -- PLTSQL -- PRINT Statement -- CREATE FUNCTION print_with_semicolon() RETURNS void AS $$ BEGIN PRINT 'PRINT with a semicolon.'; END $$ LANGUAGE pltsql; SELECT print_with_semicolon(); CREATE FUNCTION print_without_semicolon() RETURNS void AS $$ BEGIN PRINT 'PRINT without a semicolon.' END $$ LANGUAGE plts...
SELECT (extract(epoch from now()) * 1e9)::int8 as epoch_ns, schemaname::text as tag_schema, relname::text as tag_table_name, quote_ident(schemaname)||'.'||quote_ident(relname) as tag_table_full_name, heap_blks_read, heap_blks_hit, idx_blks_read, idx_blks_hit, toast_blks_read, toast_blks_hit, tidx_...
<reponame>huq-industries/carto-spatial-extension ---------------------------- -- Copyright (C) 2021 CARTO ---------------------------- CREATE OR REPLACE FUNCTION @@SF_PREFIX@@transformations._CONCAVEHULL (geojsons ARRAY, maxEdge DOUBLE, units STRING) RETURNS STRING LANGUAGE JAVASCRIPT AS $$ @@SF_LIBRARY_CONTENT@@ ...
<filename>openGaussBase/testcase/SQL/DDL/view/Opengauss_Function_DDL_View_Case0030.sql -- @testpoint: 视图所有者删除视图,成功,不加cascade,合理报错 --建表 drop table if exists table_view_030; create table table_view_030(id int,name varchar(20)); --插入数据 insert into table_view_030 values(1,'hello'),(2,'world'); --创建视图 drop view if exists te...
create schema spring; CREATE TABLE IF NOT EXISTS `spring`.`Customer` ( `id` INT NOT NULL AUTO_INCREMENT, `firstName` VARCHAR(45) NULL, `lastName` VARCHAR(45) NULL, PRIMARY KEY (`id`) );
--cross join. select * from Employee as e1 cross join Employee as e2 select * from Track inner join genre on track.GenreId = Genre.GenreId select * from track right join Genre on track.GenreId = Genre.GenreId select ar.name + ' ' + t.Name from track as t inner join Album as al on t.AlbumId = al.AlbumId inner ...
CREATE TABLE tabu ( words TEXT NOT NULL , reason VARCHAR(64) NOT NULL , PRIMARY KEY (words) );
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 ...
<reponame>fablecode/dueltank /* Post-Deployment Script Template -------------------------------------------------------------------------------------- This file contains SQL statements that will be appended to the build script. Use SQLCMD syntax to include a file in the post-deployment script. Example: ...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jul 18, 2021 at 05:39 PM -- Server version: 10.5.10-MariaDB -- PHP Version: 8.0.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 06, 2016 at 09:53 PM -- Server version: 5.5.46-0ubuntu0.14.04.2 -- PHP Version: 5.5.9-1ubuntu4.14 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
<reponame>jimjonesbr/oai_fdw SET client_min_messages = 'debug2'; DROP EXTENSION IF EXISTS oai_fdw; CREATE EXTENSION oai_fdw; SELECT oai_version(); -- SELECT * FROM oai_fdw_listMetadataFormats('oai_server_ulb'); /** CREATE SERVER oai_server FOREIGN DATA WRAPPER oai_fdw OPTIONS (url 'https://sammlungen.ul...
<gh_stars>0 -- name: CreateTask :one INSERT INTO tasks ( status, ulid, worker, url, sd_hash ) VALUES ( 'new', $1, $2, $3, $4 ) RETURNING *; -- name: GetAllTasks :many SELECT * FROM tasks; -- name: GetTask :one SELECT * FROM tasks WHERE ulid = $1 LIMIT 1; -- name: GetTaskBySDHash :one SELECT * FROM tasks WHERE sd...
<filename>web/dbWebSource/procedures_functions/createTable.sql CREATE PROCEDURE [dbo].[createTable] @id int AS BEGIN SET NOCOUNT ON; DECLARE @create_table_stmt NVARCHAR(max) = ''; DECLARE @create_tt_stmt NVARCHAR(max) = ''; DECLARE @drop_tt_stmt NVARCHAR(max) = ''; DECLARE @drop_stmt NVARCHAR(max...
SET DEFINE OFF; ALTER TABLE AFW_12_ATRIB_SCENR_NOTFC_ITEM ADD ( CONSTRAINT AFW_12_ASN_ITEM_PK PRIMARY KEY (SEQNC) ENABLE VALIDATE) /
<filename>db/librarysystem.sql -- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Oct 09, 2016 at 10:32 PM -- Server version: 5.5.49-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*...
<filename>SupportManager/MemoEngine/Reply/Documents/Reply.sql -------------------------------------- ---답변형 게시판 응용 프로그램 -------------------------------------- --[0] 답변형 게시판(Reply)용 테이블 설계 Create Table dbo.Reply ( Num Int Identity(1, 1) Not Null Primary Key, --번호 Name VarChar(25) Not Null, ...