text stringlengths 6 9.38M |
|---|
create or replace type FMT_type is table of varchar2(100);
/
create or replace type FMT_obj_nodeid force is object
(
id number
);
/
create or replace type FMT_nest_tab_nodeid is table of FMT_obj_nodeid;
/
create or replace type FMT_node_timeseries is table of varchar2(100);
/
create or replace type FMT_NodeAttriValu... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 02, 2016 at 10:49 AM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 7.0.8
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
Creation of Matview from Jsonb table:
--Step 1
--Execute following script
-- replace <schema-name > with the actual schema name
-- replace <table-name > with the actual jsonb table name
-- replace <col-name> with the actual column name of the jsonb table hwihc holds the jsonb records
SELECT FO... |
truncate address, shop, provider, product, purchase,
prod_in_purchase, supply, prod_in_supply, prod_in_shop cascade;
copy address from 'D:\Documents\Programs\Postgres\Shops\address.txt' delimiter '|' null '!';
copy shop from 'D:\Documents\Programs\Postgres\Shops\shop.txt' delimiter '|' null '!';
copy provider from ... |
/*
Navicat MySQL Data Transfer
Source Server : MySql
Source Server Version : 50617
Source Host : localhost:3306
Source Database : tongbao
Target Server Type : MYSQL
Target Server Version : 50617
File Encoding : 65001
Date: 2016-01-11 12:41:42
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... |
SELECT py_pgmail(
'sentFromEmail@whatever.com', -- from
array['dest@email.com','dest2@email.com'], -- to
array['cc@email.com','cc2@email.com','cc3@email.com'], -- cc
array['bcc@email.com','bcc2@email.com','bcc3@email.com'], -- bcc
'My subject', -- subject
'<USERNAME>', -- login
'<PASSWORD>', ... |
/**
* ebiz database script
* @author: fusq
* @version: 1.0.0
* @create: 2009/08/26
* @update: 2009/08/26
*/
-- ----------------------------
-- Table structure for department
-- ----------------------------
DROP TABLE IF EXISTS `departments`;
CREATE TABLE `departments` (
`id` int(11) NOT NULL auto_... |
--------------------------------------------------------
-- DDL for Table R_SOURCE_FILES_LOADHIST
--------------------------------------------------------
CREATE TABLE "VF_SPMC_REF"."R_SOURCE_FILES_LOADHIST"
( "LOAD_DATE" DATE DEFAULT SYSDATE,
"SOURCE_FILE_TYPE" VARCHAR2(20),
"SOURCE_FILE_NAME" VARCHAR2(... |
timing start create_temp_tables_#;
DROP TABLE APPSUPPORT.TCS####_invoices;
CREATE TABLE APPSUPPORT.TCS####_invoices
(
"INVOICE_NUMBER" VARCHAR#(###)
);
-- grant permissions on this table
grant select, insert, update, delete on APPSUPPORT.TCS####_invoices to freedom, ehr, adt, sentinel, appuser, appsupport;
|
drop table if exists modeling.hrc_v1_10242015;
create table modeling.hrc_v1_10242015 as
select distinct
enterprise_id
, (1/(1+EXP(-1.51503068992321+
(female*-0.166264428365517)+
(a.age*-0.000966156706169997)+
(age2*-0.00100773272120943)+
(age17to34*0.151961607197418)+
(age35to49*0.0573810682908898)+
(blac... |
# Host: cookingwheels.com (MySQL 5.1.54)
# Database: cookingwheels_prod
# Generation Time: 2011-06-09 16:05:07 -0500
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40... |
-- --------------------------------------------------------
-- Host: localhost
-- Versión del servidor: 10.1.21-MariaDB - mariadb.org binary distribution
-- SO del servidor: Win32
-- HeidiSQL Versión: 9.4.0.5125
-- -------------------------------------------... |
SELECT a.Title, c.Name AS CategoryName, t.Name AS TownName, s.Status FROM Ads a
LEFT JOIN Categories c
ON c.Id = a.CategoryId
LEFT JOIN Towns t
ON t.Id = a.TownId
LEFT JOIN AdStatuses s
ON s.Id = a.StatusId
WHERE Status = 'Published' AND
(t.Name = 'Sofia' OR t.Name = 'Stara Zagora' OR t.Name = 'Blagoevgrad')
ORDER BY a... |
CREATE TABLE `messages` (
`mid` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`tid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` smallint(5) unsigned NOT NULL DEFAULT '0',
`message` text NOT NULL,
`created_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`mid`),
KEY `tid` (`tid`,`created_... |
CREATE TEMPORARY TABLE AP_1 AS
WITH C0_AP_1 AS (
SELECT * FROM tb_sensor_unified WHERE activepower IS NOT NULL
)
SELECT dFrom, dTo
FROM (
SELECT datetime as dFrom,
LEAD(datetime, 1) OVER (ORDER BY datetime) AS dTo,
activepower AS currAp,
LEAD(activepower, 1) OVER (ORDER BY datetime) AS nextAp
FROM C0_AP_1) F
WHERE ... |
insert into ClubAdviser (clubid,fid,name) values('40001','f0001','Soccer');
insert into ClubAdviser (clubid,fid,name) values('40002','f0002','Basketball');
insert into ClubAdviser (clubid,fid,name) values('40003','f0003','Baseball');
insert into ClubAdviser (clubid,fid,name) values('40004','f0004','Debate');
in... |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Waktu pembuatan: 05 Mar 2019 pada 21.08
-- Versi server: 10.1.37-MariaDB-cll-lve
-- Versi PHP: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 S... |
CREATE DATABASE chat;
USE chat;
/* Create other tables and define schemas for them here! */
CREATE TABLE messages (
id integer(11) PRIMARY KEY AUTO_INCREMENT,
message varchar(255),
username integer (11),
roomname varchar(255)
);
CREATE TABLE users (
id integer(11) PRIMARY KEY AUTO_INCREMENT,
username var... |
ALTER TABLE site_attribute_action DROP FOREIGN KEY `fk_saa_site_attr`;
|
# WordPress MySQL database migration
#
# Generated: Tuesday 3. June 2014 14:08 UTC
# Hostname: localhost
# Database: `rp3agency`
# --------------------------------------------------------
/*!40101 SET NAMES utf8 */;
SET sql_mode='NO_AUTO_VALUE_ON_ZERO';
|
INSERT INTO public.creeps (id, user_id) VALUES (1, 7); |
/**
* SQL for searching customer voice information
* @author TuyenVHA
* @version $Id: CustomerVoiceEditService_searchCustomerVoiceInfor_Sel_01.sql 20098 2014-08-11 07:26:02Z p_guen_toan02 $
*/
SELECT
SCV.CUSTOMER_VOICE_ID
,SCV.SHISETSU_CD
,SCV.CST_VOI_KEISAI_OPR_KBN
,SCV.ANSWERER_KBN
,SCV.OTHER_ANS... |
CREATE VIEW PROD_NOT_92(name)
AS SELECT S_PRODUCT.NAME
FROM S_PRODUCT, S_ITEM, S_ORD
WHERE S_ITEM.PRODUCT_ID=S_PRODUCT.ID
AND S_ITEM.ORD_ID=S_ORD.ID
AND TO_CHAR(S_ORD.DATE_ORDERED, 'yyyy') NOT LIKE '1992';
DROP VIEW PROD_NOT_92;
CREATE VIEW CUST_PROD_PRICE(NAME, PRODUCT, QUANTITY, PRICE)
AS SELECT S_CUSTO... |
INSERT INTO skills(type, skill) VALUES ('TECHNICAL', "Java");
INSERT INTO skills(type, skill) VALUES ('TECHNICAL', "Python");
INSERT INTO skills(type, skill) VALUES ('SOFT', "Leadership");
INSERT INTO skills(type, skill) VALUES ('SOFT', "Teamwork");
INSERT INTO country(ISO_code, name) VALUES (2048, "MOLDOVA");
INSERT... |
INSERT INTO `Users` VALUES ('1','vandervort.ubaldo','Schaden','Tate','mose89@example.org','510675'),
('2','ullrich.aniya','Deckow','Rowland','qzboncak@example.net','200552'),
('3','earline48','Deckow','Gerda','donnelly.sigurd@example.net','106563'),
('4','qkiehn','Konopelski','Rhianna','xking@example.com','101614'),
(... |
insert into serv_accruals (period_connect, clie_id, subs_id, period_serv, summ_serv)
select period_connect, clie_id, subs_id, period_serv, summ_serv
from cso_money_basic_services
on conflict do nothing |
--
-- Database: `supermarket`
--
-- --------------------------------------------------------
--
-- Table structure for table `basket`
--
CREATE TABLE IF NOT EXISTS `basket` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`completed` tinyint(1) NOT NULL DEFAULT '0',
`timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMEST... |
Select
pr.key,
pr.value,
case
when pr.key = 'mt_id'
then (
select
(mt_jsonb->>'mt_code') || ' ' ||
(mt_jsonb->>'mt_width') || 'x' ||
(mt_jsonb->>'mt_height') ||
(mt_jsonb->>'mt_measure') || ' ' ||
(
case
when mt_jsonb->>'mt_measure' = 'in'
then round((((mt_jsonb-... |
DROP TABLE allstar;
DROP TABLE player_stats;
CREATE TABLE allstar (
id INT PRIMARY KEY,
season VARCHAR,
player VARCHAR
);
CREATE TABLE player_stats (
id INT PRIMARY KEY,
season VARCHAR,
games_played INT,
player VARCHAR,
points DECIMAL,
rebounds DECIMAL,
assists DECIMAL,
steals DECIMAL,
blocks DECIMAL,
tu... |
DROP DATABASE IF EXISTS Ampa;
CREATE DATABASE Ampa;
USE Ampa;
/*
** Descripción básica de los campos de la tabla Users**
- El campo dni es la clave principal.
- El campo activo tendrá un valor de 0 hasta que el administrador compruebe que ha
realizado el pago. Cuando lo active, tendra de valor un... |
drop index IX__india_new_raster_tiled_0;
drop index IX__india_new_raster_tiled_1;
drop index IX__india_new_raster_tiled_2;
drop index IX__india_new_raster_tiled_3;
select DropGeometryColumn('_india_new_raster_tiled_0','geom');
select DropGeometryColumn('_india_new_raster_tiled_1','geom');
select DropGeometryColumn('_... |
CREATE TABLE geometry_columns
(
f_table_schema character varying(256) NOT NULL,
f_table_name character varying(256) NOT NULL,
f_geometry_column character varying(256) NOT NULL,
coord_dimension integer NOT NULL,
srid integer NOT NULL,
type character varying(30) NOT NULL,
CONSTRAINT geometry_columns_pk PRIM... |
ALTER TABLE ${ohdsiSchema}.sec_permission ADD COLUMN for_role_id INTEGER;
INSERT INTO ${ohdsiSchema}.sec_permission (id, value, for_role_id)
SELECT nextval('${ohdsiSchema}.sec_permission_id_seq'), REPLACE(CAST(new_perms.val AS VARCHAR), '%s', REPLACE(REPLACE(value, 'cohortdefinition:*:generate:', ''), ':get', '')), ro... |
create database pagina;
use pagina;
create table usuarios(
id int auto_increment,
nombre varchar(50),
ap varchar(50),
am varchar(50),
usuario varchar(50),
password text(50),
primary key(id)
); |
select idculture,p.nom,t.qtx
from traitement t,produit p,culture c
where idculture=fkculture
and idproduit=fkproduit
|
CREATE TABLE [ERP].[Comparador] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[Fecha] DATETIME NULL,
[Numero] VARCHAR (20) NULL,
[Nombre] VARCHAR (250) NULL,
[Descripcion] VARCHAR (250) NULL,
[UsuarioRegistro] VARCHAR (25... |
UPDATE department
SET dept_name = 'Electrical and Electronics Engineering'
WHERE dept_no = 2;
INSERT INTO department (dept_name, office, office_tel)
VALUES ('Special Education', 'Education Building 403', '02-3290-2347');
REPLACE INTO student (student_id, name, year, dept_no, major)
VALUES (20110001, 'Emma Watson', 2,... |
/* -------------CREATE A DATABASE-------------------*/
/*SYNTAX: CREATE A DATABASE*/
CREATE DATABASE IF NOT EXISTS db_name;
/*SYNTAX DROP A DATABASE*/
DROP DATABASE IF EXISTS db_name;
/*SYNTAX: USE A DATABASE*/
/*The USE staten1ent selects the L pecified database and n1ak.e it the current database.*/
USE db_name;
... |
INSERT INTO `person` (`PersonID`, `Navn`, `Fødselsdag`) VALUES (NULL, 'Per', '2017-08-03')
INSERT INTO `person` (`PersonID`, `Navn`, `Fødselsdag`) VALUES (NULL, 'Hans', '2017-08-03')
INSERT INTO `person` (`PersonID`, `Navn`, `Fødselsdag`) VALUES (NULL, 'Peter', '2017-08-03')
INSERT INTO `person` (`PersonID`, `Navn`, `F... |
-- Update the 'Active' attribute to true for 'end_date'
-- Update the 'Name' attribute for 'end_date'
-- Insert 'Group' & 'Ordinal' attribute for 'end_date'
UPDATE "DisplayProperties"
SET "Value" = 'true'
WHERE "PropertyName" = 'end_date' AND "Attribute" = 'Active';
UPDATE "DisplayProperties"
SET "Value" = 'Date of t... |
set linesize 300
set pagesize 1000
column owner format a17
column object_name format a45
column created format a22
column last_ddl_time format a22
column status for a7
SELECT
owner,
object_name,
object_type,
created,
last_ddl_time,
timestamp,
status
FROM
dba_invalid_objects
ORDER BY
timestamp, last_ddl_tim... |
select hacker_id,
(select h.name from hackers h where h.hacker_id = maximum.hacker_id),
sum((maximum.score)) as "SCORES"
from (select s.hacker_id, max(s.score) as score from submissions s, hackers h group by s.hacker_id, s.challenge_id) maximum
group by hacker_id having sum((maximum.score)) > 0
order by sum((maxim... |
SELECT *
FROM TB_TesoreriaTipo |
SELECT cohorts.name, AVG(completed_at - started_at)
FROM assistance_requests
JOIN students ON assistance_requests.student_id = students.id
JOIN cohorts ON students.cohort_id = cohorts.id
GROUP BY cohorts.name; |
-- Drop table
-- DROP TABLE public.project
CREATE TABLE public.project (
project_key int8 DEFAULT unique_rowid() NOT NULL,
project_id text(2147483647) NOT NULL,
"name" text(2147483647) NOT NULL,
description text(2147483647),
workspace_id text(2147483647) NOT NULL,
"version" int8 DEFAULT 0:::INT
) ;
-- Drop tab... |
CREATE DATABASE IF NOT EXISTS maimai_blogchecker;
USE maimai_blogchecker;
CREATE TABLE IF NOT EXISTS users (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
email VARCHAR(256),
confirm_id VARCHAR(256),
status INT UNSIGNED,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
updated_at TIMESTAMP NOT NULL DEFA... |
-- update einstein database for Release Version 1.0
-- includes updates no. 28 .. 42
USE einstein;
ALTER DATABASE einstein DEFAULT CHARACTER SET 'utf8';
ALTER TABLE cgeneraldata ADD COLUMN CompSpecificDiscountRate DOUBLE COMMENT 'Company Specific Discount rate' AFTER InterestExtFinancing;
ALTER TABLE cgeneraldata AD... |
BEGIN
FOR c IN
(SELECT c.owner,c.table_name,c.constraint_name
FROM user_constraints c,user_tables t
WHERE c.table_name=t.table_name
AND c.status='ENABLED'
ORDER BY c.constraint_type DESC,c.last_change DESC)
LOOP
FOR D IN
(SELECT P.Table_Name Parent... |
-- Exercicio 1.1
-- 1
select Nome, YEAR(DataNasc) from UTENTE;
--2
select Nome, DataNasc, MONTH(DataNasc), DAY(DataNasc) from UTENTE
where (YEAR(DataNasc)> 2000);
--3
select Nome from UTENTE
where Nome like 'Pedro%' or Nome like '%silva';
-- 4
select ISBN, Num, EmpUtente from CÓPIA
where EmpUtente<>1 and EmpUtente is ... |
Select
WorkstationName,
PP_TERMINAL_NUMBER 'Terminal_ID',
pp_com_port 'PinPad_Com_Port',
CASE ENCRYPTED_PAYMENT_TYPE
when 0 then 'None'
when 1 then 'Ingenico'
when 2 then 'MagTek'
END as 'Device_Manufacturer',
case MAGENSA_CC_SCAN_DEVICE_TYPE
when 0 then 'None'
when 1 then 'IPAD'
when 2 then 'DYNAMAG'
... |
-- ----------------------------
-- Table structure for ums_role_permission_relation
-- ----------------------------
DROP TABLE IF EXISTS `ums_role_permission_relation`;
CREATE TABLE `ums_role_permission_relation` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`role_id` bigint(20) DEFAULT NULL,
`permission_id` b... |
use crawler;
alter table bookDirectory add column book_id int default null;
alter table bookChapter add column book_id int default null;
alter table bookChapter add column book_name varchar(100) default null; |
CREATE PROCEDURE [DW].[usp_Engagement_CampusDetails]
@CampusCode CHAR(2)
, @StartDate DATE
, @EndDate DATE
AS
;WITH AdultStats AS (
SELECT
CalendarYear
, CalendarMonth
, HouseholdIdentifier
, IndividualIdentifier
, Dimcampus.Code
, SUM(WeekendAttendanceCount) AS WeekendAttendanceCount
, SUM(Giv... |
create table if not exists trabalho_autor
(
id int auto_increment primary key,
trabalho_id int not null,
autor_id int not null,
FOREIGN KEY (trabalho_id) REFERENCES trabalho(id) ON DELETE CASCADE,
FOREIGN KEY (autor_id) REFERENCES autor(id) ON DELETE CASCADE
);
|
CREATE TABLE schema1.log
(
id bigint NOT NULL AUTO_INCREMENT,
request_time timestamp,
ip text,
request_type text,
status int,
browser text,
CONSTRAINT description_pkey PRIMARY KEY (id)
);
|
select distinct Pno from employee, works_on
where Ssn=Essn and Lname='Smith'
union
select distinct Pnumber from employee,project,department
where Dnum=Dnumber and Mgr_ssn=Ssn and Lname='Smith'; |
SELECT O.ANIMAL_ID, O.NAME
FROM ANIMAL_OUTS O
LEFT OUTER JOIN ANIMAL_INS I USING(ANIMAL_ID)
WHERE I.ANIMAL_ID IS NULL
ORDER BY O.ANIMAL_ID;
|
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
`username` varchar(128) DEFAULT NULL COMMENT '登录名',
`nickname` varchar(128) DEFAULT NULL COMMENT '昵称',
`realname` varchar(128) DEFAULT NULL COMMENT '实名',
`identity` varchar(128) DEFAULT NULL COMME... |
SELECT
-- 連番
C.SEQ_NO,
-- 連番(hidden)
C.SEQ_NO AS FILE_LINE,
-- 実施日時
C.CREDIT_REPORTS_CREATE_TIME,
-- 与信残高ファイルパス
C.CREDIT_REPORTS_FILE_PATH,
-- 与信残高ファイル名
C.CREDIT_REPORTS_FILE_NAME,
-- 更新者
U.USER_NAME
-- 与信残高ファイル作成管理
FROM CREDIT_REPORTS_CREATE_HISTORY C
-- ユーザマスタ
LEFT OUTER JOIN LEASE_USER U
-- 与... |
use exampledb;
DROP TABLES if exists survey ;
CREATE TABLE survey (
id int(11) NOT NULL AUTO_INCREMENT,
username varchar(255) ,
first_name VARCHAR(275) ,
last_name VARCHAR(275) ,
email varchar(255) ,
origin varchar(255),
destination varchar(255) ,
begintrip varchar(255) ,
created_at datetime NOT NULL,... |
------------------------------------------------------------------------------
------------------------------------------------------------------------------
-- Creation script for sequence SCHEDULER.SQ_SCHEDULE_ID
--
-- This file was generated from database instance ABC.
-- Database Time : 28FEB2018 17:10:06... |
/*https://platform.stratascratch.com/coding-question?id=10285&python=*/
select a.date,count(b.user_id_receiver)/count(a.user_id_sender)::float as percentage_acceptance
from(select date,user_id_sender,user_id_receiver from fb_friend_requests where action = 'sent') a
left join (select date,user_id_sender,user_id_receive... |
CREATE DATABASE icafe_db;
CREATE TABLE coffee_sorts
(
id integer NOT NULL PRIMARY KEY,
sort_name character varying(255) NOT NULL,
price double precision NOT NULL,
disabled boolean NOT NULL
);
CREATE TABLE orders
(
id integer NOT NULL PRIMARY KEY,
date_time timestamp without time zone NOT NULL,... |
-- Build database
DROP TABLE IF EXISTS FACILITY CASCADE;
DROP TABLE IF EXISTS CLIMATE CASCADE;
DROP TABLE IF EXISTS CHEMICAL CASCADE;
DROP TABLE IF EXISTS LOCATION CASCADE;
DROP TABLE IF EXISTS DATE CASCADE;
DROP TABLE IF EXISTS NURSERY_ANALYSIS CASCADE;
CREATE TABLE FACILITY (
Facility_ID NUMERIC PRIMARY KEY NOT NU... |
# CREATE DATABASE
CREATE DATABASE IF NOT EXISTS Personnes;
USE Personnes;
CREATE TABLE IF NOT EXISTS Continents (
id_cont int(255) NOT NULL auto_increment,
nom_cont VARCHAR(24) UNIQUE,
PRIMARY KEY (id_cont)
)
ENGINE = INNODB;
CREATE TABLE IF NOT EXISTS Pays (
id_pays int(255) NOT NULL auto_increment,
... |
CREATE DATABASE micro;
\c micro;
CREATE TABLE "microservice" (
"service_id" integer NOT NULL PRIMARY KEY,
"service_name" character(100) NOT NULL
);
INSERT INTO "microservice" ("service_id","service_name") VALUES
(1,'Hello world');
|
DELETE FROM budget_transactions;
INSERT INTO budget_transactions
(date, payee, memo, outflow, inflow, account_id, subcategory_id, user_id)
VALUES
('09/28/2019', 'Payee', 'Coffee', 4, null, 3, 2, 1),
('09/28/2019', 'Payee', 'Whole Foods', 24, null, 3, 1, 1),
('09/29/2019', 'Payee', 'Trader Joe`s', 32, ... |
/* Formatted on 21/07/2014 18:37:01 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRE0_ETL_FILE
(
ID_FILE,
FILE_NAME,
DIRECTORY_NAME,
COD_FILE,
EXT_TABLE_NAME,
EXT_TABLE_NAME_DTA,
EXT_TABLE_NAME_INC,
EXT_TABLE_NAME_DTA_INC,
FILE_NAME_INC,
DIRECTORY_NAME_INC
)
AS
S... |
/*
SQLyog Community v11.52 (64 bit)
MySQL - 5.0.77 : Database - phn20_nightly
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY... |
USE Expenditure;
DROP FUNCTION IF EXISTS UnitsToKwh;
DELIMITER $$
CREATE FUNCTION UnitsToKwh (Units DECIMAL(10,2), CalorificValue DECIMAL(10,2))
RETURNS DECIMAL(10, 2)
DETERMINISTIC
BEGIN
RETURN 1.02264 * Units * CalorificValue / 3.6;
END$$
DELIMITER ;
DROP FUNCTION IF EXISTS UnitsToKwhByDate;
DELIMITER $$
C... |
create table users(
username varchar_ignorecase(128) not null primary key,
password varchar_ignorecase(512) not null,
enabled boolean not null);
create table authorities (
username varchar_ignorecase(128) not null,
authority varchar_ignorecase(128) not null);
create unique index idx_auth... |
-- phpMyAdmin SQL Dump
-- version 4.9.5
-- https://www.phpmyadmin.net/
--
-- ホスト: localhost:8889
-- 生成日時:
-- サーバのバージョン: 5.7.24
-- PHP のバージョン: 7.4.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT *... |
INSERT INTO series VALUES (1, "Knights of the Round Table", 1, 2);
INSERT INTO series VALUES (2, "To the Stars & Beyond", 2, 1);
INSERT INTO subgenres VALUES (1, "Space Travel");
INSERT INTO subgenres VALUES (2, "Time Travel");
INSERT INTO authors VALUES (1, "Mary Jo");
INSERT INTO authors VALUES (2, "Steve Mark");
... |
CREATE TABLE restaurant(
rest_id int NOT NULL,
rest_tel bigint,
rest_add varchar(250) NOT NULL,
rest_name varchar(250) NOT NULL,
rest_type int,
rest_takeout int,
rest_delivery int,
PRIMARY KEY(rest_id)
);
CREATE TABLE user(
user_id int NOT NULL,
user_name varchar(50) DEFAULT 'New User',
user_tel bigint,
us... |
/*
create or replace procedure getname(sp in studies.splace%type) as
cursor s is select * from studies where splace=sp;
t s%rowtype;
begin
open s;
loop
fetch s into t;
exit when s%notfound;
dbms_output.put_line(t.pname);
end loop;
close s;
end;
*/
--EXP-24(***S.KAARTHIKEYA PAVANA KUMAAR -19BQ... |
use bai5bt1;
# create table products(
# id int,
# productcode int,
# productname varchar(20),
# productprice float,
# productamount int,
# productdescription text,
# productstatus bit
# );
# create unique index indexcode on products(productCode);
# alter table products add unique dsa (produc... |
DROP KEYSPACE IF EXISTS TwentyPoint;
|
-- установить параметры онлайн категории билетикса
UPDATE [prod].[ProductCategories]
SET [NotifyOrderStatusUrl]= N'http://199.199.199.95:8100/bitrix/components/travelshop/ibe.frontoffice/collection_redirect.php'
where [Id]=100 |
drop table if exists `status`;
crete table `status` (
id int(8) primary key auto_increment,
userid int(8) not null,
body varchar(255) not null,
via int(3) not null default 1,
reply_to int(8) not null default 0,
dateline int(10)
);
drop table if exists `members`;
create table `members`(
id int(... |
-- Create table
drop table SERINOTE purge;
create table SERINOTE
(
SERINOTE_EM_ADDR NUMBER(19) not null,
NOPAGE INTEGER,
DATE_MODIF_TEXTE INTEGER,
TEXTE CLOB,
BDG3_EM_ADDR INTEGER,
BDG3_EM_ADDR_ORD INTEGER,
NUM_MOD INTEGER
);
-- Create/Recreate primary, unique and foreig... |
CREATE SCHEMA IF NOT EXISTS helper;
|
-- @author Kevin Bavay
DROP SCHEMA IF EXISTS business_days CASCADE;
CREATE SCHEMA business_days;
CREATE SEQUENCE business_days.users_id_seq;
CREATE TYPE business_days.user_role AS ENUM ('USER', 'ADMIN');
CREATE TABLE IF NOT EXISTS business_days.users (
user_id INTEGER PRIMARY KEY
DEFAULT NEXTVAL('busines... |
/*$tempViewSQL*/
SELECT
--与信残高明細VIEW_A.ベンダーリース与信残高(所属ベンダー)
ISNULL(A.AGENCY_CREDIT_AMOUNT,0) AS AGENCY_CREDIT_AMOUNT,
/**** chengzikang 2016/7/13 update start *******/
--与信残高明細VIEW_B.ベンダーリース与信残高(全てベンダー)(Partner Lease)
ISNULL(B.ALL_AGENCY_CREDIT_AMOUNT,0) AS ALL_AGENCY_CREDIT_AMOU... |
CREATE DATABASE Bamazon;
USE Bamazon;
CREATE TABLE `products` (
`ItemId` int(11) NOT NULL,
`ProductName` char(25) DEFAULT NULL,
`DepartmentName` char(25) DEFAULT NULL,
`Price` float DEFAULT NULL,
`StockQuantity` int(11) DEFAULT NULL,
PRIMARY KEY (`ItemId`)
);
INSERT INTO products (ItemId,ProductName,Dep... |
/*
To run this file, we do the following in our Terminal:
1. Go to the directory of this sql file.
2. Get into our mysql console.
3. Run "source schema.sql"
*/
CREATE DATABASE goals_db;
USE goals_db;
CREATE TABLE goals
(
id int NOT NULL AUTO_INCREMENT,
goal varchar(255) NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO goal... |
ALTER TABLE `xxx_papoo_mv_meta_lang_1` ADD `mv_mail_text_create_user` TEXT NOT NULL; ##b_dump##
ALTER TABLE `xxx_papoo_mv_meta_lang_1` ADD `mv_mail_text_create_admin` TEXT NOT NULL; ##b_dump##
ALTER TABLE `xxx_papoo_mv_meta_lang_1` ADD `mv_mail_text_change_user` TEXT NOT NULL; ##b_dump##
ALTER TABLE `xxx_papoo_mv_me... |
----------------------------------------------------------------------------------------------------------
-- Author : Hidequel Puga
-- Date : 2021-10-01
-- Description : Get table from schema
----------------------------------------------------------------------------------------------------------
selec... |
CREATE TABLE v1_Person
( PersonId INTEGER PRIMARY KEY
, MemberId INTEGER
, PreferredName TEXT
, FirstName TEXT NOT NULL
, FamilyName TEXT
, DateOfBirth DATE
, PhoneMobile TEXT
... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 17, 2020 at 01:11 PM
-- Server version: 10.4.13-MariaDB
-- PHP Version: 7.4.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
alter table message add column deleted int;
drop view message_v;
drop view message_dialog_v;
create view message_v as
select message._id _id,
message.dialog_id dialog_id,
message.writer_id writer_id,
message.body body,
message.dt dt,
message.local_status local_status,
message... |
--申請情報から頭金データを取得する。
SELECT
'0000000000' AS SUPPLIES_NO,--物件番号:「0000000000」
'0' AS PAY_NO,--回数:「0」
NULL AS WITHDRAW_TYPE,--支払/入金大分類:NULL
NULL AS WITHDRAW_TYPE_DETAIL,--支払/入金種別:NULL
/*payReceiveFlgReceive*/ AS PAY_RECEIVE,--入出金区分:「入金」
A.SCHEDULE_WITHDRAW_METHOD AS WITHDRAW_METHOD,--回収方法:A.予定回収方法
A.WITHDRAW_SCHEDU... |
/*1 ciudad*/
INSERT INTO `huella_carbono`.`ciudad`
(`codigo`,
`nombre`,
`emisionPromedio`,
`pais`,
`poblacion`,
`area`)
VALUES
( 00001,'cali'
,0.08
,'colombia',2401000
,619
);
INSERT INTO `huella_carbono`.`ciudad`
(`codigo`,
`nombre`,
`emisionPromedio`,
`pais`,
`poblacion`,
`area`)
VALUES
(
00002,'bogota'
,0.25
,... |
CREATE TABLE users_roles (user_id int, role_id int, CONSTRAINT FOREIGN KEY (user_id)
REFERENCES users(id), CONSTRAINT FOREIGN KEY (role_id)
REFERENCES roles(id), PRIMARY KEY (user_id,role_id)); |
ALTER TABLE movie ALTER COLUMN abstract DROP NOT NULL; |
CREATE TABLE course_tags(
id UUID PRIMARY KEY,
tag_id UUID REFERENCES tags(id)
)
|
CREATE TABLE [ERP].[AnticipoCompraCuentaPagar] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[IdAnticipo] INT NULL,
[IdCuentaPagar] INT NULL,
PRIMARY KEY CLUSTERED ([ID] ASC),
FOREIGN KEY ([IdAnticipo]) REFERENCES [ERP].[AnticipoCompra] ([ID]),
CONSTRAINT [FK__AnticipoC__IdCue__61130711] F... |
UPDATE Users
SET UserName='plami_73'
WHERE UserName='PM'; |
CREATE TABLE globalLedger(
total_cash_flow Number(15, 2),
savings_interest Number(4, 2),
savings_amount Number(15, 2),
loan_interest Number(4,2),
loan_amount Number(16, 2),
credit_amount Number(15, 2),
debit_amount Number(15,2)
);
CREATE TABLE users(
UIN INT,
firstName VARCHAR(30),
middleName VARCHAR(30),
... |
DROP DATABASE IF EXISTS ratings;
CREATE DATABASE ratings;
USE ratings;
CREATE TABLE reviews
(
review_id INT NOT NULL AUTO_INCREMENT,
product_id INT NOT NULL,
rating SMALLINT NOT NULL,
review_date DATETIME DEFAULT CURRENT_TIMESTAMP,
summary VARCHAR(1000) NOT NULL,
body VARCHAR(5000) NOT NULL,
recommend ... |
DELETE FROM rel_block_width_type;
DELETE FROM manual_block;
DELETE FROM manual_ROW;
DELETE FROM manual_PAGE;
DELETE FROM MANUAL;
commit; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.