text stringlengths 6 9.38M |
|---|
insert into salt (id, salt, password_id) values (1, 'ug50dREof', 1);
insert into salt (id, salt, password_id) values (2, 'f8xIRxKBRF', 2);
insert into salt (id, salt, password_id) values (3, 'BEnyfrV', 3);
insert into salt (id, salt, password_id) values (4, 'XLniywqHhX', 4);
insert into salt (id, salt, password_id) val... |
-- phpMyAdmin SQL Dump
-- version 5.0.3
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 07, 2021 at 09:14 PM
-- Server version: 10.3.27-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... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 19-05-2016 a las 19:14:28
-- Versión del servidor: 5.5.49-0ubuntu0.14.04.1
-- Versión de PHP: 5.6.17-3+deb.sury.org~trusty+1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/... |
ALTER TABLE projects DROP COLUMN max_deploys_kept;
|
UPDATE googleplaystore
SET installs = substr(installs, 1, length(installs) - 1)
WHERE installs LIKE '%+' |
INSERT INTO series (title, author_id, subgenre_id)
VALUES ("Harry Potter", 1, 1);
INSERT INTO series (title, author_id, subgenre_id)
VALUES ("Twilight", 2, 2);
INSERT INTO books(title, year, series_id)
VALUES ("The Philosopher's Stone", 1997, 1);
INSERT INTO books(title, year, series_id)
VALUES ("The Chamber of Se... |
CREATE DATABASE app;
CREATE USER 'app'@'localhost' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON app.* TO 'app'@'localhost';
SET GLOBAL time_zone = '+3:00';
SET time_zone = '+3:00'; |
DROP TABLE IF EXISTS product;
DROP TABLE IF EXISTS componentCategory;
DROP TABLE IF EXISTS component;
DROP TABLE IF EXISTS unit;
DROP TABLE IF EXISTS recipeItem;
DROP TABLE IF EXISTS location;
DROP TABLE IF EXISTS menu;
DROP TABLE IF EXISTS menuItem;
DROP TABLE IF EXISTS eventV3;
DROP TABLE IF EXISTS employee;
DROP TAB... |
select sum(lo_extendedprice * lo_discount) as revenue
from lineorder
where lo_orderdate >= 19940101 and lo_orderdate <= 19940131
and lo_discount>=4 and lo_discount<=6
and lo_quantity>=26
and lo_quantity<=35;
|
CREATE SCHEMA IF NOT EXISTS pgtools;
SET search_path = pgtools, public;
CREATE OR REPLACE VIEW query_statements AS (
SELECT calls,
(total_time / 1000) AS total_time,
(total_time/calls / 1000) AS avg_time,
regexp_replace(query, E'[\n\r\t ]+', ' ', 'ig') AS query
FROM pg_stat_statements
WHERE que... |
Create INSERT
-- 一般的
INSERT テーブル名(カラム名, カラム名)
VALUES(値, 値);
-- MySQL(MariaDB)限定
INSERT SET テーブル名
カラム名=値, カラム名=値, カラム名=値;
Update UPDATE
-- 全レコード対象(まれ)
UPDATE SET テーブル名
カラム名=値, カラム名=値;
-- 特定のレコード対象(普通はこっち)
UPDATE SET テーブル名
カラム名=値, カラム名=値
WHERE カラム名=この条件;
Delete DELETE
-- 全レコード対象(普通やら... |
/*
SQLyog Ultimate v13.1.1 (64 bit)
MySQL - 5.5.46 : Database - thirdshop
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHEC... |
CREATE TABLE [ASData_PL].[FAT_ROATPV2_NationalAchievementRate]
(
[Id] bigint NOT NULL,
[ProviderId] int NOT NULL,
[Age] smallint NULL,
[SectorSubjectArea] varchar(1000) NULL,
[ApprenticeshipLevel] smallint NULL,
[OverallCohort] int NULL,
[OverallAchievementRate] d... |
CREATE OR REPLACE VIEW public.web_vdgo_bypass
AS
SELECT vdg_obj_work.id,
vdg_obj_work.id_object,
vdg_obj_work.id_exec,
vdg_obj_work.type_dog,
vdg_obj_work.date_action,
vdg_obj_work.exec_vdgo,
CASE
WHEN web_vdgo_buff_data.exec_vdgo IS NULL THEN 0
ELSE web_vdgo_buff_d... |
INSERT INTO gluo_tipo_cuenta_contable(
descripcion, activo, fecha_creacion, fecha_modificacion,
usu_creador, usu_modificador)
VALUES ('RENTA-ORDEN', 'A', CURRENT_TIMESTAMP, NULL,
1, NULL);
INSERT INTO gluo_tipo_cuenta_contable(
descripcion, activo, fecha_creacion, ... |
insert into equipos
values('E1', 'Ogijares', 'Gra', 'Javi', '1/1/2000');
insert into equipos
values('E2', 'Armilla', 'Gra', 'Juan', '1/2/2000');
insert into equipos
values('E3', 'Padul', 'Gra', 'Jose', '3/4/2010');
insert into equipos
values('E4', 'Zubia', 'Gra', 'Adri', '1/1/2000');
insert into jugadores
values('J1',... |
DROP PROCEDURE CPI.COPY_POL_PACK_WDEDUCTIBLES;
CREATE OR REPLACE PROCEDURE CPI.copy_pol_pack_wdeductibles(
p_item_no IN GIPI_WITEM.item_no%TYPE,
p_par_id IN GIPI_PARLIST.par_id%TYPE,
p_policy_id IN GIPI_POLBASIC.policy_id%TYPE
)
IS
/* Revised to have conformity with the objects... |
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = off;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET escape_string_warning = off;
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with... |
<?php
/**
* @file EditUser.sql
* updates an specified user from %User table
* @author Till Uhlig
* @param string \$userid a %User identifier or username
* @param string \<?php echo $values; ?> the input data, e.g. 'a=1, b=2'
* @result -
*/
?>
UPDATE User
SET <?php echo $values; ?>
WHERE U_id like '<?php echo... |
create table Users (id integer Primary Key,
username varchar(80) NOT NULL,
first_name varchar(80),
last_name varchar(80),
uni varchar(80),
study_year varchar(80),
is_admin bool NOT NULL DEFAULT false,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW());
create table OrderWork (id va... |
CREATE DATABASE doingsdone
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE doingsdone;
CREATE TABLE users (
id INT AUTO_INCREMENT PRIMARY KEY,
registration DATETIME DEFAULT NOW(),
email CHAR(128) NOT NULL,
name CHAR(128) NOT NULL,
password CHAR(128) NOT NULL,
contacts CHAR(128)
);
CREATE TABLE project... |
SET serveroutput ON
DECLARE
v_exists INTEGER := 0;
BEGIN
SELECT COUNT (*)
INTO v_exists
FROM all_indexes
WHERE owner = 'CPI'
AND index_name = 'TAX_PERIL_PK';
IF v_exists <> 0 THEN
EXECUTE IMMEDIATE ('ALTER TABLE CPI.GIIS_TAX_PERIL DROP CONSTRAINT TAX_PERIL_PK');
DECLARE
... |
select *
from `woven-passkey-328019`.`querry_adventureworks20211025`.`purchasing_purchaseorderheader`
where purchaseorderid is null
|
CREATE VIEW projects_view AS
WITH user_clips AS (
SELECT c.*, u.name, u.profile_photo_url FROM clips AS c
INNER JOIN users AS u ON c.user_id = u.firebase_user_id
)
SELECT
projects.id,
projects.name,
projects.status,
projects.openshot_id,
projects.export_id,
projects.owner,
projects.music_v... |
COL d_name FOR a20
COL p_name FOR a20
SELECT do.obj# d_obj
, do.name d_name
, do.type# d_type
, po.obj# p_obj
, po.name p_name
, to_char(p_timestamp,'DD-MON-YYYY HH24:MI:SS') "P_Timestamp"
, to_char(po.stime ,'DD-MON-YYYY HH24:MI:SS') "STIME",
decode(sign(po.stime-p_timestamp... |
INSERT INTO `addon_account` (`name`, `label`, `shared`) VALUES
('society_farm','Fazenda',1)
;
INSERT INTO `addon_inventory` (`name`, `label`, `shared`) VALUES
('society_farm','Fazenda', 1)
;
INSERT INTO `datastore` (`name`, `label`, `shared`) VALUES
('society_farm', 'Fazenda', 1)
;
INSERT INTO `jobs`(`name`, `labe... |
CREATE TABLE brevmottakere_frittstaende_brev
(
id UUID PRIMARY KEY,
fagsak_id UUID NOT NULL REFERENCES fagsak (id),
saksbehandler_ident VARCHAR NOT NULL,
tidspunkt_opprettet TIMESTAMP(3) NOT NULL,
personer JSON NOT NULL,
organisasjoner ... |
SELECT DISTINCT n.nspname AS schemaname
,c.relname AS tablename
,a.attname AS COLUMN
,a.attnum AS column_position
,pg_catalog.format_type(a.atttypid, a.atttypmod) AS TYPE
,pg_catalog.format_encoding(a.attencodingtype) AS encoding
,a.attisdistkey AS distkey
,a.attsortkeyord AS sortkey
,a.attnotnull AS notnull
... |
ssh mem-prd-dbdw01.mem.yazino.com
mysql -uroot
use damjan
drop table if exists damjan.tmp_alyssa;
create table damjan.tmp_alyssa as
select
player_id,
if (
max(audit_date) > curdate() - interval 14 day and max(audit_date) <= curdate() - interval 7 day,
'7-13',
if (
max(aud... |
create table coffee_order (
id int8 not null,
beverage varchar(255),
name varchar(255),
orderNumber varchar(255),
status int4,
primary key (id)
);
|
REM tconstr.sql
REM Version 1.0, last updated 8/5/97
REM This block illustrates nested table constructors, as described in
REM Chapter 12 of _Oracle8 PL/SQL Programming_ by Scott Urman.
DECLARE
TYPE t_NumbersTab IS TABLE OF NUMBER;
-- Create a table with one element.
v_Tab1 t_NumbersTab := t_NumbersTab... |
-- 10-genre_id_by_show.sql
-- lists all shows contained in hbtn_0d_tvshows that have at least one genre
-- linked.
SELECT tv_shows.title, tv_show_genres.genre_id
FROM tv_shows
JOIN tv_show_genres
ON tv_show_genres.show_id = tv_shows.id
ORDER BY tv_shows.title, tv_show_genres.genre_id;
|
/*
test cases
*/
--creating users (insert into role table first)
INSERT INTO ers_users(ers_username, ers_password, user_first_name, user_last_time, user_email, user_role_id) VALUES ('luismir15', 'password', 'Luis', 'Miranda', 'luis@email.com', 1);
INSERT INTO ers_user_roles(user_role) VALUES ('employee');
INSERT I... |
-- SELECT
-- SUM(assistance_requests.completed_at - assistance_requests.started_at)/(SELECT COUNT(*)
-- FROM cohorts) AS "total_duration"
-- FROM cohorts
-- JOIN students ON students.cohort_id = cohorts.id
-- JOIN assistance_requests ON student_id = students.id;
SELECT avg (total_duration) as average_total_du... |
-- Criar Banco escoladb
create database escoladb;
use escoladb;
-- Criar tabela aluno
CREATE TABLE aluno (
id int(11) PRIMARY KEY AUTO_INCREMENT,
ra char(15) NOT NULL,
nome varchar(100) NOT NULL,
curso varchar(50) NOT NULL,
nascimento date DEFAULT NULL,
telefone char(25) DEFAULT NULL
); |
/* ============================== UPDATE SET ===================================
A?a??daki gibi tedarikciler ad?nda bir tablo olu?turunuz ve vergi_no
sutununu primary key yap?n?z. Ayr?ca a?a??daki verileri tabloya giriniz.
vergi_no NUMBER(3),
firma_ismi VARCHAR2(50),
irtibat_ismi VARCHAR2(5... |
select concat('Approved: ', name), grade
from students
where grade >= 7
order by grade DESC |
CREATE TABLE `altares` (
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT,
`id_difunto` bigint(11) NOT NULL,
`dedicatoria` varchar(32) NOT NULL DEFAULT '',
`niveles` int(11) NOT NULL,
`repisas` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `difuntos` (
`id` bigint(1... |
drop table SIPF41
select * into SIPF41 from openquery(DB2400, 'select a.* from lscadea.sipf41 a,
lscadea.migsinies b
where
a.RAMO = b.RAMO
and a.POLIZA = b.POLIZA
... |
-- Users are created heere
INSERT INTO user_data(username,email,userPW,birth_date)
VALUES("Mikey_Banks","Mike101@gmail.com","test12345","2000-05-06"),("Tim_west103","timmyJakes@gmail.com","test1234567","2000-12-11"),("Sebi123","sebiHeals@yahoo.com","test1234","2000-02-18");
-- Displays all users info
Select* from use... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50626
Source Host : 127.0.0.1:3306
Source Database : spare_time_education
Target Server Type : MYSQL
Target Server Version : 50626
File Encoding : 65001
Date: 2016-04-29 07:21:03
*/
SET... |
DROP TABLE IF EXISTS ontology.patientsinfo;
use ontology;
CREATE TABLE `patientsinfo` (
`PostNumber` int(11) DEFAULT NULL,
`DiseaseId` text,
`DiseaseName` text,
`SymptomId` text,
`SymptomName` text,
`TreatmentId` text,
`TreatmentName` text,
`DrugId` text,
`DrugName` text,
`BodypartId` text,
`Bodyp... |
CREATE DATABASE `db_kms_zipkin`;
USE `db_kms_zipkin`;
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户id',
`username` varchar(20) DEFAULT NULL COMMENT '用户名',
`password` varchar(20) DEFAULT NULL COMMENT '密码',
`name` varchar(20) DEFAULT NULL COMMENT '姓名',
... |
INSERT INTO activities ( name, type ) VALUES ( $1, $2 );
|
-- create new table supplier products for the demonstration
create table SupplierProduct (
supplierId INT,
productId INT,
primary key (supplierId, productId)
);
-- second create store procedure that inserts product id and supplier id into the supplierProduct table
drop procedure InsertSupplierProduct;
create pro... |
-- Check that no nonces are less than 0
SELECT *
FROM {{ref('joined_tables')}}
WHERE nonce < 0 |
delete from es_db_test.Contributor_Survey_Period;
delete from es_db_test.Survey_Period;
delete from es_db_test.Survey_Contact;
delete from es_db_test.Survey_Enrolment;
delete from es_db_test.Survey;
delete from es_db_test.Contact;
delete from es_db_test.Contributor;
delete from es_db_test.Query_Type;
Insert Into es_d... |
USE codeup_test_db;
show databases;
DROP TABLE IF EXISTS albums;
CREATE TABLE albums (
id INT UNSIGNED NOT NULL AUTO_INCREMENT primary key,
artist VARCHAR (128),
name VARCHAR(128),
release_date SMALLINT UNSIGNED,
sales FLOAT (6, 2),
genre VARCHAR(128),
unique unique_name (name)
);
descri... |
delete from HtmlLabelIndex where id=24023
/
delete from HtmlLabelInfo where indexid=24023
/
INSERT INTO HtmlLabelIndex values(24023,'数据导入')
/
INSERT INTO HtmlLabelInfo VALUES(24023,'数据导入',7)
/
INSERT INTO HtmlLabelInfo VALUES(24023,'data import',8)
/
INSERT INTO HtmlLabelInfo VALUES(24023,'數據導入',9)
/
delete from... |
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50710
Source Host : localhost:3306
Source Database : mq_test2
Target Server Type : MYSQL
Target Server Version : 50710
File Encoding : 65001
Date: 2016-07-27 14:48:50
*/
SET FOREIGN_KEY_CHECKS=0;
-... |
CREATE TABLE `mf_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` varchar(30) CHARACTER SET utf8 NOT NULL COMMENT '用户英文id',
`nickname` varchar(20) CHARACTER SET utf8 NOT NULL COMMENT '用户姓名',
`password` char(32) NOT NULL COMMENT '密码hash值',
`intro` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT '用户简介',... |
-- Add up migration script here
CREATE TABLE decks (
id uuid DEFAULT uuid_generate_v4(),
position int NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
|
LOCK TABLES `usuarios` WRITE;
INSERT INTO `usuarios` VALUES (1,'Nuñez Caballero','38926305','manuelnc53@gmail.com','ACTIVO','Manuel','M','2664000614'),(2,'Perez','38926305','manuelnc53@gmail.com','ACTIVO','Juan','M','2664000614');
UNLOCK TABLES;
LOCK TABLES `billeteras` WRITE;
INSERT INTO `billeteras` VALUES (1,'ACTIV... |
drop table if exists revenue;
create table revenue
(
id integer generated by default as identity,
location_id integer,
date date,
sum decimal(19, 2),
primary key (id)
); |
ALTER TABLE uk_callcenter_event ADD DISCALLER VARCHAR(50);
ALTER TABLE uk_callcenter_event ADD DISCALLED VARCHAR(50);
ALTER TABLE uk_chat_message ADD cooperation tinyint;
update uk_chat_message set cooperation = 0
UPDATE uk_callcenter_event SET DISCALLED = CALLED,DISCALLER = CALLER WHERE calltype <> 'orgcal... |
CREATE TABLE `games` (
`id` INT NOT NULL AUTO_INCREMENT,
`version` INT NOT NULL DEFAULT 0,
`created` TIMESTAMP NOT NULL DEFAULT now(),
`modified` TIMESTAMP NOT NULL DEFAULT now(),
`user_id` INT NOT NULL,
`outcome` ENUM('WON', 'LOST') NULL,
PRIMARY KEY (`id`),
CONSTRAINT `fk_user_id`
FOREIGN KEY (`us... |
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.45-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CO... |
-- Show all series with the corresponding genres.
SELECT tv_shows.title, tv_genres.name
FROM tv_show_genres
RIGHT JOIN tv_shows
ON tv_show_genres.show_id = tv_shows.id
LEFT JOIN tv_genres
ON tv_show_genres.genre_id = tv_genres.id
ORDER BY tv_shows.title, tv_genres.name;
|
SET ECHO OFF
REM ***************************************************************************
REM ******************* Troubleshooting Oracle Performance ********************
REM ************************* http://top.antognini.ch *************************
REM ***************************************************************... |
use furama_resort;
insert into loai_khach(ten_loai_khach) value('Diamond');
insert into loai_khach(ten_loai_khach) value('Platinium');
insert into loai_khach(ten_loai_khach) value('Gold');
insert into loai_khach(ten_loai_khach) value('Silver');
insert into loai_khach(ten_loai_khach) value('Member');
select * from loa... |
-- true for enabling sending emails to administrators
INSERT INTO configuration_item (code, category_code, current_value, default_value, data_type, mandatory, validation)
VALUES('ohf.mail.admin.enabled', 'core.mail', 'false', 'false', 'BOOLEAN', true, null); |
/*
Now we'll learn three more DML commands and finish this section. But
this does not mean we learned all details of DML. We just learned the really
really basic things.
3. DROP -> We use to remove a table/column
4. TRUNCATE -> When we want to delete the data of a table but we don't
want to delete the table.
5. REN... |
-- phpMyAdmin SQL Dump
-- version 4.1.14
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 23-12-2015 a las 12:29:10
-- Versión del servidor: 5.6.17
-- Versión de PHP: 5.5.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARA... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Gép: 127.0.0.1
-- Létrehozás ideje: 2016. Nov 16. 01:01
-- Kiszolgáló verziója: 10.1.16-MariaDB
-- PHP verzió: 7.0.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIE... |
--
-- FUO_SLCT_DIR (Directory)
--
CREATE OR REPLACE DIRECTORY
FUO_SLCT_DIR AS
'/data02/unit_offer/subscriber_lastcalltime/process_dir';
|
USE test;
DROP TABLE IF EXISTS `MEMBER`;
CREATE TABLE MEMBER (
id VARCHAR(50) NOT NULL,
pw VARCHAR(256) NOT NULL,
name VARCHAR(100) NOT NULL,
salt VARCHAR(10) NOT NULL,
lastTitle VARCHAR(100),
isEnable BIT(1) NO... |
/*Create Database Quan_ly_SV;*/
/*Create Database MyDB
On(
Name = MyDB_Data,
FileName = 'D:\Database\MyDB_Data.mdf',
Size = 1MB,
Maxsize = 10MB,
FileGrowth = 10%
)*/
/*DROP Database Quan_ly_SV;*/
/*USE Quan_ly_SV;*/
|
/*
Navicat MySQL Data Transfer
Source Server : fortiro
Source Server Version : 50533
Source Host : localhost:3306
Source Database : 4tiro
Target Server Type : MYSQL
Target Server Version : 50533
File Encoding : 65001
Date: 2016-04-14 13:10:01
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... |
drop procedure if exists genkeys;
drop procedure if exists answers_to_csv;
USE `progweb`;
DELIMITER $$
CREATE PROCEDURE genkeys(
IN TES_id INT,
IN amount INT)
BEGIN
SET @count = amount;
SET @gen = '';
WHILE @count > 0 DO
SET @gen = LEFT(MD5(RAND()), 8);
if not exists (select * from `pr... |
DROP TABLE IF EXISTS `retengcms_keywords`;
|
CREATE PROCEDURE dbo.sp_AgendaTotais @Data AS DateTime
AS BEGIN
SELECT
'0' AS Tipo,
CONVERT(VARCHAR(10), @Data, 103) AS Texto,
(SELECT ISNULL(SUM(ABS(ValorPrevisao)),0) FROM LancamentosFinanceiros
INNER JOIN PlanoContasFinanceiro ON PlanoContasFinanceiro.IdContaFinanceira = LancamentosFinanceiros.IdContaFinance... |
-- Values for the pokemons_accepted_genders table.
INSERT INTO pokemons_accepted_genders VALUES (1, 1);
INSERT INTO pokemons_accepted_genders VALUES (4, 1);
INSERT INTO pokemons_accepted_genders VALUES (7, 1);
INSERT INTO pokemons_accepted_genders VALUES (10, 1);
INSERT INTO pokemons_accepted_genders VALUES (13, 1);
IN... |
update workflow_browserurl set linkurl = '/hrm/jobtitles/HrmJobTitlesEdit.jsp?id=' where linkurl = '/hrm/jobtitles/JobTitlesEdit.jsp?id='
/ |
ALTER TABLE `countries`
ADD COLUMN `GeoCode` VARCHAR(32) NULL AFTER `StatesCount`;
|
/* Formatted on 2015/07/16 16:15 (Formatter Plus v4.8.8) */
SET serveroutput on
DECLARE
v_exists VARCHAR2 (1) := 'N';
BEGIN
FOR x IN (SELECT 1
FROM cpi.giis_parameters
WHERE param_name = 'RECOMP_RENEWAL_PREM_RT')
LOOP
v_exists := 'Y';
DBMS_OUTPUT.put_line
... |
CREATE VIEW historico_reproducao_usuarios AS(
SELECT u.nome_usuario AS `usuario`,
c.nome_cancao AS `nome`
FROM usuario AS `u`
INNER JOIN historico AS `h`
ON u.usuario_id = h.usuario_id
INNER JOIN cancao AS `c`
ON h.cancao_id = c.cancao_id
ORDER BY `usuario`, `nome`
);
|
CREATE DATABASE IF NOT EXISTS `BookstoreDB` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */;
USE `BookstoreDB`;
-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
--
-- Host: 127.0.0.1 Database: BookstoreDB
-- ------------------------------------------------------
-- Server version 5.7.24-0ubunt... |
use cms_db;
SET SQL_SAFE_UPDATES = 0;
#######################initial configuration######################
insert into login_details(user_id,pwd,privilege_level) values ("448501","cts-2014",3);
insert into admin_details values ("448501","cts-2014",3);
insert into department_details values
("1000","CSE"),
("1001","IT")... |
Script base de datos
/*Version de BBDD postgreslql 9,6*/
/*Creacion de base de datos y esquemas*/
CREATE DATABASE tienda WITH OWNER = postgres ENCODING = 'UTF8';
-----------------------------------------------------------------------------------
GRANT ALL ON DATABASE tienda TO postgres;
/*En la base de datos tiend... |
-- CreateTable
CREATE TABLE "Workspace" (
"gid" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"isOrganization" BOOLEAN NOT NULL
);
-- CreateTable
CREATE TABLE "Team" (
"gid" TEXT NOT NULL PRIMARY KEY,
"name" TEXT NOT NULL,
"description" TEXT,
"descriptionHtml" TEXT,
"createdAt" DATET... |
SET SERVEROUTPUT ON
DECLARE
v_exist NUMBER := 0;
BEGIN
SELECT 1
INTO v_exist
FROM cpi.giis_reports
WHERE report_id = 'GIPIR153';
IF v_exist = 1
THEN
DBMS_OUTPUT.put_line ('GIPIR153 already existing in GIIS_REPORTS.');
END IF;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
INSERT IN... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-02-2020 a las 16:12:09
-- Versión del servidor: 10.1.38-MariaDB
-- Versión de PHP: 7.3.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
... |
{% snapshot customers_snapshot %}
{{
config(
target_schema='dbt_mkt_snapshots',
strategy='check',
unique_key='id',
check_cols=['marital_status'],
)
}}
select id ,
year_birth,
education,
marital_status,
income from {{ source('mkt', 'custome... |
INSERT INTO ArtDefine_UnitInfos (Type,DamageStates,Formation)
SELECT ('ART_DEF_UNIT_KHOPESH_SWORDSMAN'), DamageStates, Formation
FROM ArtDefine_UnitInfos WHERE (Type = 'ART_DEF_UNIT_SWORDSMAN');
INSERT INTO ArtDefine_UnitInfoMemberInfos (UnitInfoType,UnitMemberInfoType,NumMembers)
SELECT ('ART_DEF_UNIT_KHOPESH... |
CREATE TABLE games (
id SERIAL PRIMARY KEY,
game TEXT NOT NULL,
status TEXT NOT NULL,
rating INTEGER,
year INTEGER,
image TEXT,
date_created TIMESTAMP NOT NULL DEFAULT now()
);
CREATE TABLE users (
id SERIAL PRIMARY KEY,
user_name TEXT NOT NULL,
password TEXT NOT NULL,
user_... |
prompt --application/shared_components/navigation/lists/feedback
begin
-- Manifest
-- LIST: Feedback
-- Manifest End
wwv_flow_api.component_begin (
p_version_yyyy_mm_dd=>'2020.03.31'
,p_release=>'20.1.0.00.13'
,p_default_workspace_id=>20
,p_default_application_id=>8950
,p_default_id_offset=>33309244842782322
,... |
Drop database if exists pruebaDeno;
Create database pruebaDeno;
use pruebaDeno;
Drop table if exists pruebaDeno;
Create table prueba (
id int primary key auto_increment,
nombre varchar(40)
);
INSERT INTO prueba (nombre) values ("prueba1"), ("prueba2"), ("prueba3");
|
SELECT i.BillingCountry, COUNT(i.InvoiceId) as InvoicesPerCountry
FROM Invoice i GROUP BY i.BillingCountry ORDER BY InvoicesPerCountry DESC;
|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Máy chủ: 127.0.0.1
-- Thời gian đã tạo: Th8 18, 2021 lúc 04:27 PM
-- Phiên bản máy phục vụ: 10.4.14-MariaDB
-- Phiên bản PHP: 7.4.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
-- List all databases
-- of MySQL server
SHOW DATABASES;
|
ALTER TABLE itemsrc ADD COLUMN itemsrc_effective DATE;
ALTER TABLE itemsrc ADD COLUMN itemsrc_expires DATE;
ALTER TABLE itemsrc ADD COLUMN itemsrc_contrct_id INTEGER REFERENCES contrct(contrct_id);
COMMENT ON COLUMN itemsrc.itemsrc_effective IS 'Effective date for item source. Constraint for overlap.';
COMMENT ON COL... |
CREATE TABLE MESSAGES
(
MESSAGE_ID VARCHAR(50) NOT NULL PRIMARY KEY,
HIBERNATE_ID VARCHAR(255) NOT NULL,
HIBERNATE_CLASS VARCHAR(255) NOT NULL,
CREATION_DATE TIMESTAMP NOT NULL,
QUEUE_NAME VARCHAR(50) NOT NULL
);
|
INSERT INTO Customer(FIRSTNAME, LASTNAME, EMAIL, PASSWORD, ADDRESS, PREMIUM)
VALUES('David', 'Sodergren', 'david@gmail.com', '123', 'Femstenaveigen 2', 0);
INSERT INTO Customer(FIRSTNAME, LASTNAME, EMAIL, PASSWORD, ADDRESS, PREMIUM)
VALUES('Adam', 'Backstrom', 'adam@gmail.com', '123', 'Skanstull 2', 0);
INSERT INTO Cus... |
CREATE TABLE bidoni(
id int,
nome char(30),
);
CREATE TABLE prodotti(
id int,
nome char(30),
id_bidone int,
);
CREATE TABLE richieste_prodotti(
id int,
nome char(30),
email char(50),
stato char(20),
data datetime;
); |
# --- !Ups
ALTER TABLE "MODEL" ADD COLUMN "ORGANIZATION_ID" INTEGER NOT NULL DEFAULT 2;
# --- !Downs
ALTER TABLE "MODEL" DROP COLUMN "ORGANIZATION_ID"; |
-- 02-09-2019
drop table ANALYTICS_CERTIFICATION_HISTOGRAM;
create table ANALYTICS_CERTIFICATION_HISTOGRAM (
dateCollect datetime not null,
amountCertified bigint,
amountError bigint,
amountFinished bigint,
amountRevoked bigint,
amountWaitingApproval bigint,
approvalPercentage double prec... |
CREATE TABLE IF NOT EXISTS mytable (number1 INT PRIMARy KEy);
INSERT INTO mytable VALUES (1) ON CONFLICT DO NOTHING;
INSERT INTO mytable VALUES (2) ON CONFLICT DO NOTHING;
INSERT INTO mytable VALUES (3) ON CONFLICT DO NOTHING;
INSERT INTO mytable VALUES (4) ON CONFLICT DO NOTHING;
INSERT INTO mytable VALUES (5) ON CONF... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 16, 2019 at 10:59 AM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @O... |
drop procedure if exists `insertaPrograma_Academico`;
DELIMITER %%
create procedure `insertaPrograma_Academico`(IN nombre varchar(100))
begin
insert into `Programa_Academico`(nombre) values(nombre);
end%%
DELIMITER ;
drop procedure if exists `insertaAcademia`;
DELIMITER //
create procedure `insertaAcademia`(IN nombre... |
create index reference_user_id_fk1
on reference (user_id); |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.