sql
stringlengths
6
1.05M
create table Person ( id int not null, firstName varchar(100), lastName varchar(100) ); GO create function PersonsWithLastName(@lastName varchar(100)) returns table as return select * from Person where lastName like @lastName; go select firstName from PersonsWithLastName('Smith'); select n...
/********************************************************************************************************************** * Copyright (C) 2005-2022 SplendidCRM Software, Inc. * MIT License * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentat...
<gh_stars>1000+ -- 2017-11-21T12:16:35.829 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator UPDATE AD_Column SET AD_Element_ID=290, ColumnName='DocumentNo', Description='Document sequence number of the document', FieldLength=40, Help='The document number is usually automatically generated by the system...
<reponame>robinsturmeit/manygolf-wasm<filename>sqitch/verify/appschema.sql -- Verify manygolf:appschema on pg BEGIN; SELECT pg_catalog.has_schema_privilege('manygolf', 'usage'); ROLLBACK;
insert into `messages` (`message_id`, `user_id`, `photo_id`, `message_content`) values (51, 36, 51, 'luctus et ultrices posuere cubilia curae nulla dapibus dolor vel est donec odio justo sollicitudin ut suscipit a feugiat et eros vestibulum ac est lacinia nisi venenatis tristique fusce congue diam id ornare imperdiet s...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Tempo de geração: 19/03/2017 às 00:04 -- Versão do servidor: 10.1.19-MariaDB -- Versão do PHP: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_...
-- @testpoint:opengauss关键字parameters(非保留),作为用户名 --关键字explain作为用户名不带引号,创建成功 drop user if exists parameters; CREATE USER parameters PASSWORD '<PASSWORD>'; drop user parameters; --关键字explain作为用户名加双引号,创建成功 drop user if exists "parameters"; CREATE USER "parameters" PASSWORD '<PASSWORD>'; drop user "parameters"; --关键字ex...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 12, 2021 at 01:15 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40...
CREATE TABLE persons ( id int(6) NOT NULL PRIMARY KEY AUTO_INCREMENT, first_name varchar(30) NOT NULL DEFAULT '', last_name varchar(30) NOT NULL DEFAULT '', email varchar(60) NOT NULL DEFAULT '', gender char(1) NOT NULL DEFAULT '' ) ENGINE=MyISAM DEFAULT CHARSET=utf8; insert into persons (id, first_name, l...
<filename>scripts/EPMPRESAS_SUPERVISORAS/SP_EMPRESAS_SUPERVISORAS.sql USE `ayr`; DROP procedure IF EXISTS `SP_EMPRESAS_SUPERVISORAS`; DELIMITER $$ USE `ayr`$$ CREATE DEFINER=`root`@`localhost` PROCEDURE `SP_EMPRESAS_SUPERVISORAS`() BEGIN SELECT ES.ID,ES.Nombre as Empresa FROM empresassupervisoras AS ES ...
USE employee_trackerDB; INSERT INTO department (name) VALUES ("Web Development"), ("Sales"), ("Legal"), ("Human Resources"), ("Management"), ("Accounting"); INSERT INTO role (title, salary, department_id) VALUES ("Senior", 200000, 1),("Junior", 60000, 1),("Lawyer", 150000, 3),("Graphic Design", 100000, 1),("Accountan...
--Synonimy --synonim dla migawki mv_ubezpieczenia CREATE OR REPLACE PUBLIC SYNONYM ubezpieczenia FOR mv_ubezpieczenia; --synonim dla klientów z Poznania (vm) CREATE OR REPLACE PUBLIC SYNONYM klienci_poznan FOR klienci@VM_LINK; --synonim dla sprzedaży z Poznania (vm) CREATE OR REPLACE PUBLIC SYNONYM sprzedaz_p...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 17, 2021 at 02:31 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
DROP TABLE IF EXISTS `LockedFiles` ; CREATE TABLE IF NOT EXISTS `LockedFiles` ( `filename` VARCHAR(2048) NOT NULL , `filesystemID` INT NOT NULL , `lastReport` DATETIME NOT NULL ) ENGINE = InnoDB; DROP TABLE IF EXISTS `InstanceDownloads` ; DROP TABLE IF EXISTS `SolverDownloads` ;
-- phpMyAdmin SQL Dump -- version 4.7.1 -- https://www.phpmyadmin.net/ -- -- Anamakine: localhost:3306 -- Üretim Zamanı: 25 Ara 2017, 19:33:17 -- Sunucu sürümü: 10.1.29-MariaDB -- PHP Sürümü: 7.0.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET ...
ALTER TABLE `TeachingPreferences` ADD UNIQUE INDEX `idx_unique_course_instructor` (`Courses_CourseId`, `Instructors_InstructorId`);
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 28 Okt 2019 pada 05.39 -- Versi server: 10.4.6-MariaDB -- Versi PHP: 7.3.8 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
-- make sure there are no empty values. UPDATE M_InventoryLine il SET C_UOM_ID = ( select p.C_UOM_ID from M_Product p where p.M_Product_ID = il.M_Product_ID) where il.C_UOM_ID is null; COMMIT; -- avoid "pending trigger events" error -- 2018-08-13T16:57:15.308 -- I forgot to set the DICTIONARY_ID_COMMENTS System Conf...
CREATE TEMPORARY TABLE dfs.tmp.temptbl_11b PARTITION BY ( col_int ) AS SELECT DISTINCT col_int FROM typeall_l ORDER BY col_int; SELECT MAX( col_int ) FROM dfs.tmp.temptbl_11b; DROP TABLE dfs.tmp.temptbl_11b;
CREATE TABLE employee ( id uuid NOT NULL ); CREATE TABLE project ( id integer NOT NULL, name text, state smallint, progress numeric, owner uuid ); CREATE TABLE project_employee ( project_id bigint NOT NULL, employee_id uuid NOT NULL ); CREATE SEQUENCE project_id_seq AS integer ...
<gh_stars>1-10 delete from LU_LICENSE_TYPE where CODE = 'M8'; delete from PROVIDER_SETTING where RELATED_ENTITY_CD = 'M8'; INSERT INTO LU_LICENSE_TYPE(CODE, DESCRIPTION) VALUES ('H1', 'Rehab Counselor Certification'); INSERT INTO LU_LICENSE_TYPE(CODE, DESCRIPTION) VALUES ('H2', 'Psychosocial Rehab Practitioner Certifi...
DROP FUNCTION IF EXISTS social.unlike(_user_id integer, _feed_id bigint); CREATE FUNCTION social.unlike(_user_id integer, _feed_id bigint) RETURNS void AS $$ BEGIN IF EXISTS ( SELECT 0 FROM social.liked_by WHERE social.liked_by.feed_id = _feed_id AND social.liked_by.liked_by = _user_i...
<gh_stars>0 -- Convert schema '/home/melmoth/amw/AmuseWikiFarm/script/../dbicdh/_source/deploy/6/001-auto.yml' to '/home/melmoth/amw/AmuseWikiFarm/script/../dbicdh/_source/deploy/7/001-auto.yml':; ; BEGIN; ; ALTER TABLE site ADD COLUMN ssl_key varchar(255) NULL, ADD COLUMN ssl_cert varchar(255) NULL,...
<reponame>NCIP/cabio /*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ TRUNCATE TABLE transcript_array_reporter; @$LOAD/indexer_new.sql transcript_array_reporter @$LOAD/constraints.sql transcript_array_reporter @$LOAD/con...
/* leave this l:see LICENSE file g:utility v:140109\s.zaglio: problem of ending \ when scripted to file. v:090909\s.zaglio: from ms support -- single test exec sp__script_jobs exec sp__run_cmd 'type %temp%\%@@servername%_jobs.sql' exec sp__run_cmd 'del %temp%\%@@servername%_jobs.sql /q...
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jan 16, 2020 at 07:00 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
BEGIN; ALTER DATABASE t_grre_ CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- do smt COMMIT;
<gh_stars>0 -- Adminer 4.3.0 MySQL dump SET NAMES utf8; SET time_zone = '+00:00'; SET foreign_key_checks = 0; SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; DROP DATABASE IF EXISTS incridea; CREATE DATABASE incridea; use incridea; DROP TABLE IF EXISTS `details`; CREATE TABLE `details` ( `id` int(11) NOT NULL AUTO_INCREM...
CREATE DATABASE mynews; \c mynews; CREATE TABLE users(id SERIAL PRIMARY KEY, name VARCHAR, gender VARCHAR, positions VARCHAR, role VARCHAR, departmentId INTEGER); CREATE TABLE departments(id SERIAL PRIMARY KEY, name VARCHAR, description VARCHAR, employees INTEGER); CREATE TABLE news(id SERIAL PRIMARY KEY, title VARCHA...
<reponame>cor14095/BigData2Files<filename>labs/demos/SensorFiles/create_hive_tables.sql<gh_stars>0 drop table if exists hvac; -- Date,Time,TargetTemp,ActualTemp,System,SystemAge,BuildingID create table hvac (readingdate string, readingtime string, targettemp int, actualtemp int, system int, systemage int, buildingid i...
<filename>PredictiveMaintenance/SQL Database/MaintenanceSAAzureSqlDB.sql IF OBJECT_ID('dbo.sp_loadScoreResult', 'P') IS NOT NULL DROP PROCEDURE [dbo].[sp_loadScoreResult] GO IF TYPE_ID('dbo.PMResultType') IS NOT NULL DROP TYPE [dbo].[PMResultType] GO IF OBJECT_ID('dbo.PMResult', 'U') IS NOT NULL DROP TABLE [dbo...
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[QRTZ_SIMPLE_TRIGGERS]') AND OBJECTPROPERTY(id, N'ISUSERTABLE') = 1) CREATE TABLE [dbo].[QRTZ_SIMPLE_TRIGGERS] ( [SCHED_NAME] [NVARCHAR] (120) NOT NULL , [TRIGGER_NAME] [NVARCHAR] (150) NOT NULL , [TRIGGER_GROUP] [NVARCHAR] (150) NOT...
CREATE TABLE [dbo].[Integration] ( [IntegrationId] UNIQUEIDENTIFIER NOT NULL, [CreatedDate] DATETIME NOT NULL, [UpdatedDate] DATETIME NOT NULL, [IsDeleted] BIT NOT NULL, [Name] N...
merge into covid19_patients p using ( select to_number(regexp_replace(col001, '^\s*(\d+)例目','\1')) "No", 50008 municipality_code, '秋田県' prefecture_name, null city_name, to_date(col002, 'MM"月"DD"日"') published_date, null onset_date, col005 patient_location, ...
CREATE TABLE `payment` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `serial` varchar(255) DEFAULT '', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE FUNCTION ufnGetColorsJson(@productModelId int) RETURNS nvarchar(max) AS BEGIN DECLARE @vals AS nvarchar(max) SELECT @vals = coalesce(@vals + ',"', '"') + [t].[color] + '"' FROM ( SELECT DISTINCT [color] FROM [SalesLt].[Product] [p] WHERE [p].[productModelI...
-- file:point.sql ln:42 expect:true SELECT '' AS one, p.* FROM POINT_TBL p WHERE p.f1 ~= '(5.1, 34.5)'
/* -- Flows for APEX - flow_engine_util.pks -- -- (c) Copyright Oracle Corporation and / or its affiliates, 2022. -- (c) Copyright MT AG, 2021-2022. -- -- Created April-2021 <NAME> (Flowquest) - for MT AG -- */ create or replace package flow_engine_util authid definer -- accessible by (flow_engine, flow_gateway...
ALTER TABLE {$NAMESPACE}_harbormaster.harbormaster_buildplan ADD viewPolicy VARBINARY(64) NOT NULL; ALTER TABLE {$NAMESPACE}_harbormaster.harbormaster_buildplan ADD editPolicy VARBINARY(64) NOT NULL;
select 'foo' where 'bar ' = 'bar'; go select 'foo' where 0xAE = 0xAE00; go select 'foo' where 101.5E5 = 1015E4; go select 'foo' where (select 'bar ') = (select 'bar'); go
<reponame>yacon/koala-framework<filename>Kwf/Update/38000.sql #tags: kwc ALTER TABLE `cache_component` DROP PRIMARY KEY , ADD PRIMARY KEY ( `component_id` , `type` , `value` , `renderer` );
<filename>src/main/resources/db/migration/sqlite/V2_0__Migrate_rings.sql update loot set piece = 'left ring' where piece = 'leftRing'; update loot set piece = 'right ring' where piece = 'rightRing'; update bis set piece = 'left ring' where piece = 'leftRing'; update bis set piece = 'right ring' where piece = 'rightRin...
-- MariaDB dump 10.19 Distrib 10.4.20-MariaDB, for Linux (x86_64) -- -- Host: localhost Database: u3137998_pendanausaha -- ------------------------------------------------------ -- Server version 10.4.20-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESUL...
<gh_stars>0 create table follower ( id INTEGER AUTO_INCREMENT, email VARCHAR(100) NOT NULL, pasta_dir VARCHAR(500) NOT NULL, professor_id INTEGER, primary key(id), foreign key(professor_id) REFERENCES professor(id) ) CHARACTER SET 'utf8' COLLATE 'utf8_general_ci';
<reponame>pdmih/AzureSQLDatawarehouse<gh_stars>0 SELECT resource_type_desc AS [resource_type_desc] , major_resource_id AS [db_name] , operation AS [db_operation] , state_desc AS [state_desc] , start_time AS [start_time] , last_modify_time AS [last_modified_timestamp] , DATEDIFF(ss,start_time,last_modify_ti...
<filename>15 JPA/src/main/resources/sql/data.sql USE spring; INSERT INTO artist (artist) VALUES ('I<NAME>aiden'), ('System of a Down'), ('Guns n` Roses'), ('Metallica') ; INSERT INTO album (artist_id, album) VALUES (1, 'A Matter of Life and Death'), (1, 'Fear of the Dark'), (2, 'Toxicity'), (2, 'Mesmerize'), ...
<reponame>brianrshort/ORM_Burger_App -- In case you have a competing database of the same name, drop the old one DROP DATABASE IF EXISTS burger_city_db; -- Create a burger city database and use it to create a new table CREATE DATABASE burger_city_db; USE burger_city_db; -- Create the table to collect the burgers....
ALTER ROLE postgres WITH ENCRYPTED PASSWORD '<PASSWORD>'; CREATE USER greetgo_secure WITH ENCRYPTED PASSWORD '<PASSWORD>'; CREATE DATABASE greetgo_secure WITH OWNER greetgo_secure; GRANT ALL ON DATABASE greetgo_secure TO greetgo_secure;
CREATE view AttributeHistoryView as SELECT x.Id ,x.[Date] ,t.[AttributeType] ,a.[Attribute] ,x.[Value] ,x.[TotalCount] ,x.[TotalImpressions] ,r.[Region] ,s.[Segment] FROM [dbo].[AttributeHistory] x left join [dbo].[AttributeType] t on x.[AttributeTypeId] = t.AttributeTypeId left join [d...
<reponame>theostanton/guided create or replace function guides_bounds(_guide guides) returns bounds as $$ select max(s.lat) as north, max(s.long) as west, min(s.lat) as south, min(s.long) as east from spots as s where guide = _guide.id group by s.guide $$ language sql stable ;
-- CreateTable CREATE TABLE "User" ( "id" SERIAL NOT NULL, "email" TEXT NOT NULL, "name" TEXT, "role" TEXT NOT NULL, CONSTRAINT "User_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Token" ( "id" SERIAL NOT NULL, "refreshToken" TEXT NOT NULL, "userId" INTEGER, "device" TEX...
DROP TABLE sequences;
Insert into EG_WF_MATRIX (ID,DEPARTMENT,OBJECTTYPE,CURRENTSTATE,CURRENTSTATUS,PENDINGACTIONS,CURRENTDESIGNATION,ADDITIONALRULE,NEXTSTATE,NEXTACTION,NEXTDESIGNATION,NEXTSTATUS,VALIDACTIONS,FROMDATE,TODATE) values (nextval('EG_WF_MATRIX_SEQ'),'ANY','WorksPackage','NEW',null,null,'Assistant engineer',null,'CREATED','Pendi...
CREATE TABLE parent ( id INT NOT NULL, PRIMARY KEY (id) ) ENGINE=INNODB; CREATE TABLE child ( id INT, parent_id INT, INDEX par_ind (parent_id), FOREIGN KEY (parent_id) REFERENCES parent(id) ON DELETE CASCADE ) ENGINE=INNODB;
<gh_stars>1-10 ALTER TABLE klage.vedtak DROP COLUMN journalpost_id, DROP COLUMN ferdigstilt_i_joark, DROP COLUMN avsluttet_av_saksbehandler; --ALTER TABLE klage.brevmottaker -- DROP COLUMN ferdigstilt_i_joark;
-- -- Author: <NAME> <<EMAIL>> -- Copyright: (c) 2016-2019, <NAME>. All Rights Reserved. -- License: MIT License; See PH7.LICENSE.txt and PH7.COPYRIGHT.txt in the root directory. -- INSERT INTO pH7_Settings (`name`, value, `desc`, `group`) VALUES ('numberProfileSplashPage', 44, 'Number of profiles to ...
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50732 Source Host : localhost:3306 Source Schema : xiaoyu_website Target Server Type : MySQL Target Server Version : 50732 File Encoding : 65001 Date: 09/09/...
use data_extracts; drop procedure if exists getKnowDiabetesAllergiesDelta; DELIMITER // CREATE PROCEDURE getKnowDiabetesAllergiesDelta() BEGIN SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; set @current_event_log_date = (select transactionDate from data_extracts.subscriber_extracts where extractId = 1); s...
/****** Object: StoredProcedure [dbo].[sp_iMart_Transform_fct_Enrollment_Pairs_edfi] Script Date: 4:40:40 PM ******/ CREATE procedure [dbo].[sp_iMart_Transform_fct_Enrollment_Pairs_edfi] ( @SAID varchar(30) = null, @Batch_Period_List varchar(max) = null ) as -- ==========================================...
SELECT client, COUNTIF(NET.REG_DOMAIN(page) != NET.REG_DOMAIN(url)) AS count_cross_origin, COUNT(0) AS total_count FROM `httparchive.almanac.wasm_stats` WHERE date = '2021-09-01' GROUP BY client
INSERT INTO employee (emp_no, birth_date, first_name, last_name, gender, hire_date) VALUES(10001, '1953-09-02', 'Georgi', 'Facello', 'M', '1986-06-26'); INSERT INTO employee (emp_no, birth_date, first_name, last_name, gender, hire_date) VALUES(10002, '1964-06-02', 'Bezalel', 'Simmel', 'F', '1985-11-21'); INSERT INTO em...
CREATE TABLE [dbo].[EAxleWeightChanges] ( --From MergedXSDs XSD --From 'genericRailML' Namespace [EAxleWeightChangesId] BIGINT NOT NULL, [AxleWeightChange] SMALLINT NOT NULL, CONSTRAINT [PK_EAxleWeightChangesId] PRIMARY KEY CLUSTERED ([EAxleWeightChangesId] ASC), CONSTRAINT [FK_EAxleWeightChanges_TAxleWeightC...
<filename>modules/core/db/update/hsql/19/190613-2-createTranslatedMessage.sql alter table DDCDL_TRANSLATED_MESSAGE add constraint FK_DDCDL_TRANSLATED_MESSAGE_ON_LOCALIZATION foreign key (LOCALIZATION_ID) references DDCDL_LOCALIZATION(ID); create index IDX_DDCDL_TRANSLATED_MESSAGE_ON_LOCALIZATION on DDCDL_TRANSLATED_MES...
<filename>SQL Query Files/SSRS_ReportsExecutedInLast24hrs.sql<gh_stars>1-10 -- Reports by count that have been run in the last 24 hours SELECT c.Name, c.[Path], COUNT(*) AS TimesRun, MAX(l.TimeStart) AS [LastRun] FROM [ReportServer].[dbo].[ExecutionLog](NOLOCK) AS l INNER JOIN [ReportServer].[dbo]....
ALTER TABLE product ADD COLUMN layer_name VARCHAR UNIQUE; UPDATE product SET layer_name = name; ALTER TABLE product ALTER COLUMN layer_name SET NOT NULL;
<reponame>alexjavier15/postgresql-cardinality<filename>src/test/regress/sql/pg_lsn.sql<gh_stars>1-10 -- -- PG_LSN -- CREATE TABLE PG_LSN_TBL (f1 pg_lsn); -- Largest and smallest input INSERT INTO PG_LSN_TBL VALUES ('0/0'); INSERT INTO PG_LSN_TBL VALUES ('FFFFFFFF/FFFFFFFF'); -- Incorrect input INSERT INTO PG_LSN_TBL...
名称: create table as 格式: CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } | UNLOGGED ] TABLE [ IF NOT EXISTS ] table_name [ (column_name [, ...] ) ] [ WITH ( storage_parameter [= value] [, ... ] ) | WITH OIDS | WITHOUT OIDS ] [ ON COMMIT { PRESERVE ROWS | DELETE ROWS | DROP } ] [ TABLESPACE tablespace_...
USE lab3; SELECT sum(Amount*Price) AS TotalPrice FROM ArriveStock WHERE ArriveDate BETWEEN timestamp('2010-02-01 00:00:00') AND timestamp('2010-02-28 23:59:59');
--Inserções para o banco 4ban INSERT INTO Tag (tag_nome, tag_descricao) VALUES('geral', 'Assuntos gerais, sem um tópico especifico'); INSERT INTO Tag (tag_nome, tag_descricao) VALUES('ti', 'Assuntos relacionados à tecnologia da Informação'); INSERT INTO Tag (tag_nome, tag_descricao) VALUES('noticia', 'Noticias ou aco...
<reponame>enriks/nutrinoids<filename>anexos/BASE DE DATOS/sistemalaravel.sql -- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 16-02-2016 a las 01:05:08 -- Versión del servidor: 5.6.17 -- Versión de PHP: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO...
<reponame>nilspeder/IM906 USE dissertation; SET sql_log_bin = OFF; set session sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION'; select event_name, current_alloc, high_alloc from sys.memory_global_by_current_bytes where current_count > 0; /*Run on...
# --- !Ups ALTER TABLE public.predictions DROP CONSTRAINT predictions_image_id_fkey; ALTER TABLE public.predictions ADD CONSTRAINT predictions_image_id_fkey FOREIGN KEY (image_id) REFERENCES images (image_id) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE public.images ADD CONSTRAINT images_users_user_id_fk FORE...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 31, 2016 at 12:24 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
<filename>Study Works/DB Construction/StoredProcedures/Queries/Test59.sql EXEC IncreasePurchasesByDateOrder '01.01.2013'
<gh_stars>0 create table cidade ( cep int primary key, nome varchar(50) not null, nro_habitantes int not null default 0, capital boolean not null, estado varchar(2) not null, renda_per_capita decimal(10, 2), data_fundacao date, constraint estado_fk foreign key (estado) references estado (sigla) ); create table estado ...
BACKUP DATABASE SoftUni TO DISK = 'F:\SoftUni-BackUp.BAK' GO
--------------- -- Functions -- --------------- DROP FUNCTION IF EXISTS now_utc(); CREATE FUNCTION now_utc() RETURNS TIMESTAMP AS $$ SELECT now() AT TIME ZONE 'utc'; $$ LANGUAGE SQL; ------------ -- Tables -- ------------ DROP TABLE IF EXISTS gateways; CREATE TABLE IF NOT EXISTS gateways ( id BI...
CREATE PROCEDURE [dbo].[InsertRule](@Id INT, @PortfolioId INT, @Expression NVARCHAR(MAX), @Timestamp DATETIME) AS BEGIN BEGIN TRY BEGIN TRAN EXEC InsertRuleHelper @Id, @PortfolioId, @Expression, @Timestamp; COMMIT TRAN END TRY BEGIN CATCH IF XACT_STATE() = -1 ROLLBACK TRAN ;THROW END CATCH RET...
/*[[ Specify the period before querying v$logmnr_contents(default as recent 30 mins). Usage: @@NAME {[YYMMDDHH24MI] [YYMMDDHH24MI]} This commands requires the "SELECT ANY TRANSACTION" and the "execute" access right on dbms_logmnr ]]*/ SET FEED OFF DECLARE TYPE t IS TABLE OF VARCHAR2(2000); t1 t; be...
/* Formatted on 24/09/2014 15:20:01 (QP5 v5.126.903.23003) */ -- TABLE: ACCB.ACCB_PERIODS_DET -- DROP TABLE ACCB.ACCB_PERIODS_DET; CREATE TABLE ACCB.ACCB_PERIODS_DET ( PERIOD_DET_ID NUMBER NOT NULL, PERIOD_HDR_ID NUMBER, PERIOD_START_DATE VARCHAR2 (21), PERIOD_END_DATE VARCHAR2 (21), ...
<filename>dbinit/inote.sql<gh_stars>10-100 DROP TABLE IF EXISTS `user`; CREATE TABLE `user` ( `id` int(11) NOT NULL, `user_name` varchar(50) NOT NULL, `password` varchar(100) DEFAULT NULL, `thumb` varchar(500) DEFAULT NULL, `about_me` varchar(2000) DEFAULT NULL, `site_title` varchar(100) DEFAULT NULL, `he...
-- wal.test -- -- db eval { -- PRAGMA wal_autocheckpoint = 0; -- INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 2 */ -- INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 4 */ -- INSERT INTO t1 SELECT randomblob(900) FROM t1; /* 8 */ -- INSERT INTO t1 SELECT randomblob...
-- file:txid.sql ln:50 expect:true select txid_visible_in_snapshot('1000100010001015', '1000100010001000:1000100010001100:1000100010001012,1000100010001013')
CREATE TABLE venues ( id SERIAL primary key, dropped text, status ENUM('open', 'closed') not null COMMENT 'Venues can be either open or closed', statuses text, -- status[], slug text not null COMMENT 'This value appears in public URLs', ...
-- switchPDB.sql : to switch to another container COL NAME FORMAT A15; SELECT NAME, OPEN_MODE from v$pdbs; PROMPT Enter Container Name : set termout off verify off col CONT new_value CONT noprint alter session set container = &1; select sys_context('userenv', 'con_name') as CONT from dual; set sqlprompt "_USER'@'_CON...
select CONCAT('\"', coalesce(organization_id, ''), '\",\"', coalesce(medication_statement_id, ''), '\",\"', coalesce(original_term, ''), '\",\"', coalesce(result_value, ''), '\",\"', coalesce(result_value_units, ''), '\"') as '\"organization_id\",\"medication_statement_id\",\"original_term\",\"result_value\",\"result_v...
create or alter view dbo.vPinSub as select top 100 cast(sum(daf_loss) as int) daf_loss, cast(sum(other_loss) as int) other_loss, cast(sum(stake_sum) as int) stake_sum, cast(...
-- Selecting specific rows using the WHERE clause SELECT * FROM students WHERE surname='Jones'; -- combining coniditons using AND SELECT * FROM students WHERE surname = 'Jones' AND subject ='Music'; -- Using numeric comparisons SELECT * FROM students WHERE surname = 'Jones' AND id > 3; -- Combing WHERe and Order By ...
<gh_stars>1-10 /* * ExtendedMap id must be unique in the snapshot file */ insert into qa_result (runid, assertionuuid, concept_id, details) select <RUNID>, '<ASSERTIONUUID>', a.referencedcomponentid, concat('ExtendedMap: id=',a.id, ' is duplicate in Snapshot file') from curr_extendedmaprefset_s a gro...
CREATE DATABASE mta; USE mta; SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; CREATE TABLE `transaction` ( `sender` varchar(50) NOT NULL, `receiver` varchar(50) NOT NULL, `credits` int(10) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; INSERT INTO `transaction` (`sender...
CREATE TEMP TABLE tmp AS SELECT 1 as tmp_column; SELECT * FROM tmp;
<reponame>Zhaojia2019/cubrid-testcases<gh_stars>1-10 --Unique violation error occurs when executing ODKU statement on a partition table with a multi-column pk. drop table if exists t1; create table t1(a int, b char(10), c smallint, primary key(a, b)) partition by hash(a) partitions 5; insert into t1(a, b, c) values(1...
<filename>openGaussBase/testcase/SQL/INNERFUNC/Datetime/Opengauss_Function_Innerfunc_Subtract_Case0015.sql -- @testpoint: date与没有明确单位的数字相减 drop table if exists test_date01; create table test_date01 (col1 date); insert into test_date01 values ('2020-10-1'); select col1:: date - integer '7' from test_date01; drop table ...
<reponame>VladaProgramming/Laravel-project -- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jun 09, 2017 at 05:27 PM -- Server version: 10.1.10-MariaDB -- PHP Version: 7.0.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @O...
ALTER TABLE accounts ADD role VARCHAR(100) ; UPDATE accounts SET role = 'ADMIN';
create database db_cilada; use db_cilada; create table prd_departamento( id int auto_increment primary key not null ,nome varchar(45) ); create table prd_produto_similar( id int auto_increment primary key not null ,nome varchar(45) ); create table prd_marca( id int auto_increment primary key not null ,no...
<reponame>public-transport-quality-grades/oevgk18-generator CREATE TABLE terrain_model ( "rid" serial PRIMARY KEY, "rast" raster );
-- Event values CREATE TABLE EVENT_VALUES ( ID INTEGER NOT NULL AUTO_INCREMENT, EVENT INTEGER NOT NULL, PROP_NAME VARCHAR(20) NOT NULL, PROP_VALUE VARCHAR(80) NOT NULL, CONSTRAINT PK_EVENT_VALUES PRIMARY KEY (ID), CONSTRAINT UQ_EVENT_VALUES UNIQUE (EVENT, PROP_NAME), CONSTRAINT FK_EVENT_VALUES_EVENT FOREIGN KEY ...
<reponame>minhthomas/PPE3_troc -- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : mar. 11 sep. 2018 à 23:06 -- Version du serveur : 10.1.25-MariaDB -- Version de PHP : 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET t...
<filename>mysql-loader-with-optimized-views/mysql_examples/SQL_Queries_Step_by_Step_Views/Description_Composite_View_Step_by_Step/1b_Snapshot_and_Full_Synonyms.sql -- All versions of all synonyms for concept 80146002 SELECT * FROM full_description WHERE conceptId = 80146002 and typeId = 900000000000013009; --...