sql
stringlengths
6
1.05M
<reponame>SwiftTechProduction/Web-TheRitzCarltonBali<filename>esto.sql -- phpMyAdmin SQL Dump -- version 3.1.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 03, 2015 at 01:15 PM -- Server version: 5.1.30 -- PHP Version: 5.2.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!40101 SET @OLD_CHARAC...
<reponame>williamtsoi1/bigquery-bank-dbt-demo<gh_stars>0 {{ codegen.generate_base_model( source_name='raw', table_name='ext_card_type_facts' ) }}
<reponame>jess-monter/chopstore<filename>src/main/resources/db.migrations/chopstore.sql CREATE TABLE chopstore.usuario ( idusuario INT auto_increment NOT NULL, nombre varchar(256) NULL, apellido varchar(256) NULL, correo varchar(256) NOT NULL, contrasena varchar(256) NOT NULL, rol varchar(9) NOT NULL, telefono v...
<gh_stars>10-100 CREATE OR REPLACE FUNCTION table_notify() RETURNS trigger AS $$ DECLARE id bigint; payload text; json_record JSON; payload_size INT; BEGIN IF TG_OP = 'INSERT' OR TG_OP = 'UPDATE' THEN id = NEW.id; json_record = row_to_json(NEW); -- Creates a DIFF from the OLD row to NEW row on upda...
SELECT * FROM psdb.employees WHERE emp_no >= 14037 AND emp_no <= 14047;
/*** * @name: findRolesByUser * @parser: template * */ select tb.ID , tb.name , tb.status , tb.remark , tb.create_at , tb.update_at , tb.APP_CODE from admin_role tb left join admin_user_role aur on tb.id=aur.role_id where aur.user_id = :userId /*** * @name: insertU...
<reponame>hongdongni/slimrepo DROP TABLE IF EXISTS `UserEntity` {Params: []}
CREATE PROCEDURE [dbo].[Team_UpdateMember] @teamId int, @userId int, @title nvarchar(64) AS UPDATE TeamMembers SET title=@title WHERE teamId=@teamId AND userId=@userId
CREATE TABLE IF NOT EXISTS workflow( id varchar(31) NOT NULL CONSTRAINT workflow_pkey PRIMARY KEY, name varchar(255) ); CREATE TABLE IF NOT EXISTS workflow_tasks( id varchar(31) NOT NULL CONSTRAINT workflow_task_pkey PRIMARY KEY, dtype varchar(31) NOT NULL, name varchar(255), class_name varchar...
-- MySQL dump 10.13 Distrib 5.5.24, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: app_container1_wordpress-interview -- ------------------------------------------------------ -- Server version 5.5.24-0ubuntu0.12.04.1-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET...
<reponame>nipunn1313/crates.io DROP INDEX IF EXISTS index_version_crate_id;
DROP TABLE IF EXISTS `menus`; CREATE TABLE `menus` ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, title varchar(128) NOT NULL, name varchar(128) NOT NULL, descp varchar(255) DEFAULT NULL, image varchar(255) DEFAULT NULL, url varchar(255) DEFAULT NULL, params text, active tinyint(3) NOT NULL DEFAULT '...
<filename>lovestory-11-14/Article.sql<gh_stars>1-10 /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50715 Source Host : localhost Source Database : yii2basic Target Server Type : MySQL Target Server Version : 50715 Fi...
CREATE TABLE IF NOT EXISTS `cot_payments_services` ( `service_id` int(10) unsigned NOT NULL auto_increment, `service_area` varchar(20) NOT NULL, `service_userid` int(11) NOT NULL, `service_expire` int(11) NOT NULL, PRIMARY KEY (`service_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1
-- @testpoint: 修改default 为'' drop table if exists test_modify cascade; create table test_modify( c_id int, c_integer integer, c_real real,c_float float, c_cdouble binary_double, c_decimal decimal(38), c_number number(38),c_number1 number,c_number2 number(20,10),c_numeric numeric(38), c_char char(50) default null, c_var...
<gh_stars>0 DROP TABLE IF EXISTS `order_item`; DROP TABLE IF EXISTS `order`;
<reponame>winiceo/levenotc<gh_stars>0 /* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 100211 Source Host : localhost:3306 Source Schema : abcotc Target Server Type : MySQL Target Server Version : 100211 File Encodin...
<reponame>arifakhriwilaga/pa-telkom -- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.58.3 -- Generation Time: Jul 16, 2018 at 04:52 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.0.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET t...
<reponame>laanito/tuqan -- -- PostgreSQL database dump -- SET client_encoding = 'LATIN1'; SET check_function_bodies = FALSE; SET client_min_messages = WARNING; -- -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres -- COMMENT ON SCHEMA public IS 'Standard public schema'; SET search_path = public, pg_...
CREATE DATABASE guacamole_db; \connect guacamole_db \i /tmp/initdb.sql \i /tmp/createuser.sql
<reponame>luizchiodelli/api-seguranca CREATE TABLE venda( codigo_venda BIGINT(20) PRIMARY KEY NOT NULL AUTO_INCREMENT, codigo_cliente BIGINT(20), codigo_marca BIGINT(20), quantidade INTEGER, valor DOUBLE )
<reponame>Wjat777/ProgrammationWeb3G1029TP2<filename>SQL/forfait-voyage.sql -- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost -- Généré le : lun. 07 fév. 2022 à 06:49 -- Version du serveur : 8.0.18 -- Version de PHP : 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUT...
<reponame>joey2017/jsyfb<filename>docs/jsfb_com.201910121730.sql /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50727 Source Host : 127.0.0.1:3306 Source Database : jsfb_com Target Server Type : MYSQL Target Server Version : 50727 File Encoding : 65...
<filename>src/main/resources/db/create.sql SET MODE PostgreSQL; /* to keep roles and responsibilities*/ CREATE TABLE IF NOT EXISTS tasks ( id int PRIMARY KEY auto_increment, description VARCHAR, completed BOOLEAN, categoryid INTEGER, roles ); /* to keep departments data*/ CREATE TABLE IF NOT EXISTS categor...
CREATE DATABASE mydb; USE mydb ; -- ----------------------------------------------------- -- Table `mydb`.`users` -- ----------------------------------------------------- CREATE TABLE users ( idusers INT(11) NOT NULL AUTO_INCREMENT, email VARCHAR(45) NOT NULL, name VARCHAR(25) NOT NULL, last_name VARCHAR(25) ...
<gh_stars>0 -- 2.0.0 Work with Storage and Compute -- 2.1.0 Review the EXAMPLE Database -- 2.1.1 Navigate to [Databases], then locate and select EXAMPLE. -- NOTE: If you do not see a list of databases, you are probably still -- drilled down into a table from the previous lab. Look for the -- ...
<reponame>mesut/java-sproc-wrapper<filename>database/test/22_shard2/21_schema1/05_stored_procedures/31_find_addresses_by_street.sql CREATE FUNCTION find_addresses_by_street(street text) RETURNS setof address_type AS $$ BEGIN return query select a_id,a_customer_id,a_street,a_number from address where a_street = stre...
<filename>5.2.3/Database/Indexes/AFW_12_SESN_FK3.sql SET DEFINE OFF; CREATE INDEX AFW_12_SESN_FK3 ON AFW_12_SESN (REF_LANG) LOGGING /
<reponame>dsalunga/mPortal<filename>Portal/Binaries/Database/Procedures/WebTheme_Get.drop.sql<gh_stars>1-10 if exists (select * from dbo.sysobjects where id = object_id(N'[WebTheme_Get]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [WebTheme_Get] GO
<reponame>yanli0303/DbInitToy CREATE PROCEDURE EditActivityAttendee ( @ActivityID INT, @AttendeeID INT, @JoinTime DATETIME, @IsCancelled INT, --0 mains NO. @CancelledTime DATETIME, @CancelledReason NVARCHAR(1024), @AttendeeSupervisorID INT ) AS DECLARE @IsExist INT SELECT @IsExist = COUNT(*) FROM ActivityAtte...
create function bv.q15_query() returns table ( like bv.q15_result ) language plpgsql as $$ begin return query select * from bv.q15_result; end $$;
-- file:alter_table.sql ln:1118 expect:true alter table c1 drop column name
CREATE TABLE test_table ( test_column_PK int, PRIMARY KEY (test_column_PK) );
CREATE TABLE EGSWTAX_DEMAND_VOUCHER ( ID BIGINT NOT NULL, APPLICATIONDETAIL BIGINT NOT NULL, VOUCHERHEADER BIGINT NOT NULL, CREATEDBY BIGINT NOT NULL, LASTMODIFIEDBY BIGINT NOT NULL, CREATEDDATE TIMESTAMP WITHOUT TIME ZONE NOT NULL, LASTMODIFIEDDATE TIMESTAMP WITHOUT TIME ZONE NOT NULL, VERSION NUMERIC ...
ALTER TABLE :"registry".changes DROP CONSTRAINT c_unique; ALTER TABLE :"registry".changes ADD UNIQUE(project, script_hash);
<filename>scriptfiles/admins.sql<gh_stars>0 CREATE TABLE IF NOT EXISTS admins ( u_id INT(11) NOT NULL, admin_level TINYINT(2) NOT NULL DEFAULT 0, PRIMARY KEY (u_id), FOREIGN KEY (u_id) REFERENCES players(u_id) ON DELETE CASCADE ON UPDATE CASCADE );
ALTER TABLE users DROP COLUMN openid_url;
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Mar 09, 2015 at 02:47 AM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
SELECT CONCAT('http://imdb.com/title/tt', REGEXP_EXTRACT(url, r'imdb.com/title/tt([0-9]+)')) AS link, SUM(score) as sum_score, COUNT(1) AS cnt FROM [fh-bigquery:hackernews.full_201510] WHERE type = 'story' AND url CONTAINS 'imdb.com/title/' GROUP BY link HAVING link IS NOT NULL ORDER BY sum_score DESC...
-- what packages are installed on this host -- SELECT * FROM PackagesOnHost('foo.example.org'); CREATE OR REPLACE FUNCTION PackagesOnHost(text,boolean) RETURNS SETOF text AS $$ SELECT P.name || '-' || PV.version FROM host H JOIN host_package HP ON H.name = $1 AND H.enabled = $2 ...
CREATE TABLE owners ( owner_id INT NOT NULL, age INT DEFAULT 0 NOT NULL, PRIMARY KEY (owner_id) ) CREATE TABLE tires ( tire_id INT NOT NULL, tire_name VARCHAR(64) NOT NULL, PRIMARY KEY (tire_id, tire_name) ) CREATE TABLE cars ( car_id INT NOT NULL, car_owner_id INT NOT NULL, car_ti...
SELECT t.nama_mesin, t.date, t.OEE FROM oee_data t INNER JOIN (SELECT nama_mesin, MAX(date) AS MaxDate FROM oee_data GROUP BY nama_mesin) tm ON t.nama_mesin = tm.nama_mesin AND t.date = tm.MaxDate SELECT t.nama_mesin, t.date, t.OEE FROM oee_data_daily t INNER JOIN (SELECT nama_mesi...
<filename>Database.sql<gh_stars>0 -- phpMyAdmin SQL Dump -- version 4.4.10 -- http://www.phpmyadmin.net -- -- Хост: localhost:8889 -- Время создания: Мар 31 2017 г., 05:22 -- Версия сервера: 5.5.42 -- Версия PHP: 5.6.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- База данных: `hostel` -- ...
INSERT INTO order_fulfillment.cardano_transaction ( customer_order_id, txid ) VALUES($1, $2);
CREATE TABLE foo (bar bool not null, addr macaddr not null); -- name: Get :many SELECT bar, addr FROM foo LIMIT $1;
/** * @author evilnapsis * @brief Modelo de base de datos * @date 2015-10-24 **/ create database library2; use library2; create table user ( id int not null auto_increment primary key, name varchar(50) not null, lastname varchar(50) not null, username varchar(50) not null, email varchar(255) not null, password ...
<filename>spec/fixtures/database/02_make_some_changes.sql USE `my_test_app`; delete from my_data where id between 30 and 50; update my_data set value = CONCAT(value, ' FoobZ') where id between 20 and 60; -- After this, data set should look like: -- +----+---------------------------+ -- | id | value ...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: 21-Ago-2017 às 21:56 -- Versão do servidor: 5.7.19-0ubuntu0.16.04.1 -- PHP Version: 7.0.18-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_C...
<gh_stars>0 -- number of periods create or replace function finan.nper ( rate double precision, pmt double precision, pv double precision, fv double precision default 0, due int default 0 -- end: 0, begin: 1 ) returns double precision language plpython3u immutable strict as $$ i...
/* * Copyright (c) 2017 Public Library of Science * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, ...
INSERT INTO public.posts_origins(post_id, origin_id) VALUES (1,1); INSERT INTO public.posts_origins(post_id, origin_id) VALUES (2,1); INSERT INTO public.posts_origins(post_id, origin_id) VALUES (3,2); INSERT INTO public.posts_origins(post_id, origin_id) VALUES (4,2); INSERT INTO public.posts_origins(post_id, origin_id)...
-- vtab1.test -- -- execsql { -- SELECT a like 'b' FROM e -- } SELECT a like 'b' FROM e
<reponame>g4brielvs/usaspending-api<gh_stars>100-1000 -- Nuke and pave the server, with the requisite USER MAPPING -- REQUIRES: -- - postgres_fdw EXTENSION in ../extensions/extensions.sql -- RUNNING: -- 1) Export environment variables -- 2) Substitute in-place using Bash eval (example: https://stackoverflow.com/a/1242...
insert into messages values("message",""); insert into playerOfDay (day,message,url) values("Friday October 7th","<NAME>","http://a.espncdn.com/combiner/i?img=/i/headshots/nhl/players/full/5118.png&w=350&h=254"); insert into playerOfDay (day,message,url) values("Saturday October 8th","<NAME>","http://a.espncdn.com/com...
SET FOREIGN_KEY_CHECKS=0; INSERT INTO iotronic.boards (created_at, updated_at, id, uuid, code, status, name, type, agent, owner, project, mobile, config, extra) VALUES ('2017-12-07 14:09:35', '2018-01-31 11:52:27', 193, '96b69f1f-0188-48cc-abdc-d10674144c68', '567', 'offline', 'yun-30', 'yun', 'wagent2', '13ae14174aa14...
USE [AIDE] GO /****** Object: StoredProcedure [dbo].[sp_getAuditQuestion] Script Date: 6/17/2019 7:31:08 AM ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO -- ============================================= -- Author: <Author,,Name> -- Create date: <Create Date,,> -- Description: <Description,...
<gh_stars>1-10 create table t(a int not null,b int); create index idx on t(a) where b>0; show index in t; alter table t change a a int; --We expect there is no index in t; show index in t; drop table t;
/* Navicat MySQL Data Transfer Source Server : 本地数据 Source Server Version : 50553 Source Host : localhost:3306 Source Database : laravelblog Target Server Type : MYSQL Target Server Version : 50553 File Encoding : 65001 Date: 2018-10-12 15:33:14 */ SET FOREIGN_KEY_C...
CREATE TABLE [dbo].[EmployeeHistory] ( [EmployeeHistoryId] INT IDENTITY (1, 1) NOT NULL, [DMLOperation] NVARCHAR (200) NOT NULL, [DMLOperationOn] DATETIME DEFAULT (getdate()) NOT NULL, [DMLOperationBy] BIGINT DEFAULT ((1)) NULL, [EmployeeId] INT ...
CREATE TABLE Partner_Preference ( user_id VARCHAR NOT NULL, min_age INTEGER NOT NULL, max_age INTEGER NOT NULL, PRIMARY KEY ( user_id ), FOREIGN KEY ( user_id ) REFERENCES User ON DELETE CASCADE );
<filename>CustomerFinder/CustomerFinderDB/dbo/Views/vwTwitterProfilesWithEducation.sql CREATE VIEW [dbo].[vwTwitterProfilesWithEducation] AS SELECT *, [dbo].fnGetTwitterAccountUrlByUserName(Username) as TwitterProfileUrl FROM TwitterAccount WITH (NOLOCK) WHERE CONTAINS(ProfileDescription,'EDUCATION')
--List all customers (full names, customer ID, and country) who are not in the US SELECT FirstName, LastName, CustomerId, Country FROM Customer WHERE COUNTRY !='USA';
SELECT COUNT(movie_id) AS "Movies with 10.0 Rating" FROM ratings WHERE rating = 10.0;
-- Tables with no dependencies get built first CREATE TABLE users ( id INT NOT NULL AUTO_INCREMENT, username VARCHAR(255) NOT NULL UNIQUE, description VARCHAR(255), PRIMARY KEY (id) ); CREATE TABLE tags ( id INT NOT NULL AUTO_INCREMENT, tag VARCHAR(255) UNIQUE, PRIMARY KEY (id) );...
INSERT INTO Admitted_Patient VALUES ('AD001','P003','W001','N009','2017-01-01 09:26:07','201'), ('AD002','P008','W002','N008','2017-01-02 11:25:15','311'), ('AD003','P006','W004','N007','2017-01-05 12:35:14','210'), ('AD004','P001','W002','N001','2017-01-06 11:35:14','302'), ('AD005','P010','W004','N006','2017-01-10 20...
<filename>src/test/resources/sql/insert/c0de9f13.sql -- file:numeric_big.sql ln:147 expect:true INSERT INTO num_exp_div VALUES (2,7,'1214843772391778.12736140758514055374122012641063725057102068473903468550817600081218003268629112404576875033249312982258034735103214596498362905996893620159213836880617309913017685260644...
<gh_stars>10-100 -- file:rowsecurity.sql ln:1150 expect:true CREATE POLICY comment_1 ON comment USING (blog_id < 4)
drop table users if exists; create table users ( id int, name varchar(20), group_id int, rol_id int ); insert into users values(1, 'User1', 1, 1); insert into users values(1, 'User1', 1, 2); insert into users values(1, 'User1', 2, 1); insert into users values(1, 'User1', 2, 2); insert into users values(1, '...
select min(a.id_name) as id,b.id,b.nazv,a.main_unit from vw_phone a left join spr_res b on trim(a.main_unit) = trim(b.nazv) group by b.id,b.nazv,a.main_unit CREATE FUNCTION rate_person (field varchar(255)) RETURNS INT BEGIN DECLARE p INT; IF INSTR(field,'Начальник')>0 THEN S...
<filename>openGaussBase/testcase/KEYWORDS/group/Opengauss_Function_Keyword_Group_Case0027.sql -- @testpoint:opengauss关键字group(保留),作为序列名 --关键字不带引号-合理报错 drop sequence if exists group; create sequence group start 100 cache 50; --关键字带双引号-成功 drop sequence if exists "group"; create sequence "group" start 100 cache 50; -...
CREATE TABLE [Lookup].[CalculatorTypes] ( [CalculatorTypeId] INT NOT NULL IDENTITY(1, 1) , [Name] VARCHAR(128) , CONSTRAINT [PK_CalculatorTypes_CalculatorTypeId] PRIMARY KEY NONCLUSTERED ([CalculatorTypeId] ASC) )
<gh_stars>0 CREATE TABLE IF NOT EXISTS sections ( id IDENTITY NOT NULL PRIMARY KEY, name VARCHAR NOT NULL, created_at TIMESTAMP DEFAULT LOCALTIMESTAMP ); CREATE TABLE IF NOT EXISTS geological_classes ( id IDENTITY NOT NULL PRIMARY KEY, section_id BIGINT, name VARCHAR NOT NULL, code VARCHAR ...
<reponame>GiriPurnama/inventoriPenjualan -- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 19 Jun 2019 pada 17.44 -- Versi server: 10.1.35-MariaDB -- Versi PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_z...
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Apr 02, 2017 at 06:08 PM -- Server version: 5.7.9 -- PHP Version: 5.6.16 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
<gh_stars>0 -- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 1172.16.17.32 -- Waktu pembuatan: 29 Des 2020 pada 10.50 -- Versi server: 10.4.17-MariaDB -- Versi PHP: 8.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER...
<gh_stars>0 CREATE TABLE IF NOT EXISTS messages( ID integer NOT NULL, RU text NOT NULL, ENG text NOT NULL, CONSTRAINT messages_pkey PRIMARY KEY (ID) ); INSERT INTO messages (ID, RU, ENG) VALUES (1, 'Привет кожаный мешок! Введи название мусора, который хочешь утилизовать или выбери из списка с помощью коман...
create database bingo; use bingo; create table juegos( pk varchar(50), fecha date, carton varchar(250), bombo longtext, persona varchar(150), constraint pk_juegos primary key (pk) );
 CREATE VIEW [etljob].[vw_JobStepCluster] AS SELECT [JobStepClusterID] ,[JobStepCluster] ,[JobID] ,[ApplicationID] ,[GroupID] ,[LayerID] ,[MetaGroupID] ,[StepNo] ,[StepNoEqual] ,[Retry] ,[FailedJobExecutionID] ,[LastRun] ,[ExpectedRunTime] FROM [etlj...
<filename>examples/business/money_value.sql --liquibase formatted sql --see http://www.liquibase.org/ --changeset <EMAIL>:1 --preconditions onFail:HALT onError:HALT --precondition-sql-check expectedResult:0 SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'money_value' -- Money value -- http://schem...
create user agent from login [agent] GO ALTER ROLE db_datareader ADD MEMBER [agent] GO
<gh_stars>1-10 /* Navicat Premium Data Transfer Source Server : subscribe Source Server Type : SQLite Source Server Version : 3021000 Source Schema : main Target Server Type : SQLite Target Server Version : 3021000 File Encoding : 65001 Date: 21/01/2020 18:30:28 */ PRAGMA fore...
CREATE OR REPLACE FUNCTION ti.getgeochronbydatasetid(_datasetid integer) RETURNS TABLE(geochronid integer, geochrontypeid integer, geochrontype character varying, agetype character varying, depth double precision, thickness double precision, analysisunitid integer, analysisunitname character varying, age double precis...
<filename>db_archive/sql_archive/1445__alter_view_antero_dw_v_st_henkilosto.sql USE [ANTERO] GO /****** Object: View [dw].[v_st_henkilosto] Script Date: 15.3.2018 14:06:02 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER view [dw].[v_st_henkilosto] as --amk select Tilastovuosi = vuosi ,Sukupuoli...
\set ON_ERROR_STOP 1 BEGIN; ALTER TABLE l_area_genre ADD CONSTRAINT control_for_whitespace_entity0_credit CHECK (controlled_for_whitespace(entity0_credit)); ALTER TABLE l_area_genre ADD CONSTRAINT control_for_whitespace_entity1_credit CHECK (controlled_for_whitespace(entity1_credit)); ALTER TABLE l_artist_genre ADD ...
<filename>test/CreateTable.sql CREATE TABLE IF NOT EXISTS lyrics( lyric_id INTEGER PRIMARY KEY AUTOINCREMENT, title TEXT, subtitle TEXT ); CREATE TEMP TABLE IF NOT EXISTS strophes( strophe_id INTEGER PRIMARY KEY ASC ON CONFLICT ROLLBACK, lyric_id INTEGER, annotation TEXT NOT NULL, content TEXT UNIQU...
UPDATE accounts SET email = CONCAT(MD5(email), '@localhost') , name = MD5(name) , first_name_length = NULL , address1 = NULL , address2 = NULL , company_name = NULL , city = NULL , state_or_province = NULL , postal_code = NULL , phone = NULL; UPDATE account_history SET email = MD5(email) , name = MD5(name)...
DROP TABLE IF EXISTS pets; CREATE Table pets ( PetId INT NOT NULL AUTO_INCREMENT, PetSpecies VarChar(50) DEFAULT NULL, PetBreed VarChar(50) DEFAULT NULL, PetName VarChar(50) DEFAULT NULL, PetAge VarChar(50) DEFAULT NULL, UserId INT, PRIMARY KEY(PetId), FOREIGN KEY (UserId) REFERENCES use...
-- Verify project_guid_trigger BEGIN; SELECT 1/COUNT(*) FROM information_schema.triggers WHERE event_object_table = 'projects' AND trigger_name = 'update_project_guid' AND action_timing = 'BEFORE' AND event_manipulation = 'INSERT' AND action_orientation = 'ROW' AND action_statement = 'EXECUTE P...
<filename>Assignment_3-4/Assignment_3.sql -- Front Page SELECT P.ID as PostID, U.Username, P.CreationTime, PM.MediaFileUrl, PM.MediaTypeID, L.NumLikes FROM Post AS P LEFT OUTER JOIN User AS U ON P.UserID = U.ID RIGHT OUTER JOIN PostMedia as PM ON PM.PostID = P.ID LEFT OUTER JOIN ( SELECT PostI...
<gh_stars>0 CREATE TABLE tb_venda_mostruario ( vdm_id INT NOT NULL AUTO_INCREMENT, vdm_ven_id INT NOT NULL, vdm_dtentrega DATE NOT NULL, vdm_dtacerto DATE, vdm_deletado BOOLEAN, PRIMARY KEY (vdm_id), FOREIGN KEY (vdm_ven_id) REFERENCES tb_vendedor(ven_id) ); CREATE TABLE tb_venda_mostruario_itens ...
<filename>migrations/sqls/20210312015850-rename-repo-users-up.sql ALTER TABLE IF EXISTS users RENAME COLUMN organizations TO repos;
<reponame>ivancekic/sql-data-analysis-part-two<gh_stars>0 CREATE TABLE INVEJ.PLANIRANJE_MAPIRANJE ( VRSTA VARCHAR2(100) NOT NULL, RED_BROJ NUMBER NOT NULL, VREDNOST VARCHAR2(50) NOT NULL ) ORGANIZATION HEAP TABLESPACE DES2 NOLOGGING PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORA...
with samara as ( select geo_lat as samara_lat, geo_lon as samara_lon from city where city = 'Самара' ) select city, ( (geo_lat - samara_lat) * (geo_lat - samara_lat) + (geo_lon - samara_lon) * (geo_lon - samara_lon) ) as distance from city, samara group by distance having distance > 0 o...
create database cadastros default character set utf8 # constraint: default character set: dá ao BD um codificação de caracter por padrão default collate utf8_general_ci; # constraint: default collate: e um collate padrão voltado ao utf8 use cadastros; #já referenciei create table pessoas ( id int not null auto_incremen...
CREATE TABLE public.city ( "name" varchar(100) NOT NULL, geo varchar(100) NOT NULL, country text NULL, id serial NOT NULL, CONSTRAINT city_pk PRIMARY KEY (id) ); CREATE TABLE public.cinema ( id serial NOT NULL, city serial NOT NULL, "name" varchar(100) NOT NULL, description text NULL, geo varchar(100) NULL, ...
<reponame>slamdev/wallethub<filename>src/main/sql/CountBugsProcedure.sql<gh_stars>0 DELIMITER $$ DROP PROCEDURE IF EXISTS countBugs$$ CREATE PROCEDURE countBugs(fromDate DATE, toDate DATE) BEGIN SELECT COUNT(id) AS number_of_bugs FROM bugs WHERE fromDate BETWEEN open_date AND close_date OR t...
<gh_stars>1-10 -- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 21-04-2018 a las 22:42:01 -- Versión del servidor: 10.1.30-MariaDB -- Versión de PHP: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zo...
-- File Locations set echo on show parameter dump_dest select name, value from v$parameter where name like '%dump_dest%'; select name, value from v$parameter where name like '%dump_dest%'; set serveroutput on exec dbms_output.put_line( scott.get_param( 'user_dump_dest' ) ) column name format a22 ...
create or replace view "AIRBYTE_DATABASE"._AIRBYTE_TEST_NORMALIZATION."NESTED_STREAM_WITH_COMPLEX_COLUMNS_RESULTING_INTO_LONG_NAMES_PARTITION_E78_DOUBLE_ARRAY_DATA_AB2" as ( -- SQL model to cast each column to its adequate SQL type converted from the JSON schema type select _AIRBYTE_PARTITION_HASHID, ...
-- file:plpgsql.sql ln:3954 expect:true drop function strtest()