text stringlengths 6 9.38M |
|---|
select *from test;
desc test; |
create table openid (
ID VARCHAR(255) not null,
Identifier VARCHAR(255),
Password VARCHAR(32),
primary key (ID)
);
create table openidattribute (
ID VARCHAR(255) not null,
AttributeName VARCHAR(255),
AttributeValue VARCHAR(255),
open_id VARCHAR(255) not null,
primary key (ID)
); |
SELECT id, name
FROM demo.sales_reps
{% form %}
sales_rep:
type: multiselect
default: all
options:
labels: name
values: id
{% endform %} |
--
-- Database: `series`
--
-- --------------------------------------------------------
--
-- Estrutura da tabela `carrinho_cupom`
--
CREATE TABLE `carrinho_cupom` (
`cupom_id` int(11) NOT NULL,
`cupom_titulo` varchar(255) NOT NULL,
`cupom_desconto` int(11) NOT NULL,
`cupom_inicio` datetime NOT NULL,
`cup... |
insert into test(content) values('Test text'); |
CREATE DATABASE franquicia;
SHOW DATABASES;
USE franquicia;
CREATE TABLE clients (
id_clients int AUTO_INCREMENT,
nom VARCHAR(50) NOT NULL,
cognom VARCHAR(100) NOT NULL,
PRIMARY KEY (id_clients)
);
SHOW TABLES;
DESCRIBE clients;
CREATE TABLE establiments (
id_establiment int AUTO_INCREMENT,
nom VARCHA... |
-- phpMyAdmin SQL Dump
-- version 4.0.3
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2016 �?11 �?19 �?13:37
-- 服务器版本: 10.1.9-MariaDB-log
-- PHP 版本: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD... |
create database flowerDB
--创建会员表
create table vip(
username varchar(20) not null primary key,
userpass varchar(16) not null,
usersex char(2),
userage int
)
--创建商品信息表
create table goodsinfo(
goodsid char(16) not null primary key,
goodsname varchar(30) not null,
goods... |
CREATE SEQUENCE CounterTeacher
START WITH 1
INCREMENT BY 1
NOMAXVALUE; |
SELECT * FROM mp3_tracks
WHERE mp3_track_id = $1;
|
/*
################################################################################
Migration script to set common boolean datatypes to booleans *correctly* in
the database
Designed for execution with Flyway database migrations tool; this should be
automatically run to completely generate the schema that is out-of-th... |
-- INIT
drop schema reTractor CASCADE;
-- DB
-- using cask db
-- SCHEMA
create schema reTractor;
-- TABLES
create table reTractor.sessions(
"id" SERIAL PRIMARY KEY,
"from_address" text,
"query" text
);
create table reTractor.data(
"id" SERIAL REFERENCES reTractor.sessions("id") ON DELETE CASCADE,
"... |
--Condição08
UPDATE alunos SET nota_1 = 1, nota_2 = 1, nota_3 = 1, nota_4 = 1
WHERE (nota_1 + nota_2 + nota_3 + nota_4)/4 < 4;
SELECT * FROM alunos; |
/*------------------------------
* Создание таблиц
*------------------------------
*
*/
CREATE TABLE IF NOT EXISTS group_permissions
(
group_id INT NOT NULL,
permission_id INT NOT NULL
) engine = innodb charset = utf8 COLLATE utf8_general_ci;
CREATE TABLE IF NOT EXISTS permissions
(
perm... |
/*
Navicat MySQL Data Transfer
Source Server : connect1
Source Server Version : 50091
Source Host : localhost:3306
Source Database : mysql
Target Server Type : MYSQL
Target Server Version : 50091
File Encoding : 65001
Date: 2012-04-26 16:08:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... |
INSERT INTO athlete (first_name, last_name, sport, team) VALUES
('Barry', 'Allen', 'breaking the timeline', 'Justice League'); |
-- phpMyAdmin SQL Dump
-- version 4.6.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: 2016-09-27 10:56:03
-- 服务器版本: 5.7.14
-- PHP Version: 5.6.25
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_... |
CREATE TABLE T_XBBNHFN_CUSTOMERDETAILS(CUSTOMER_ID NUMBER,CUSTOMER_NAME VARCHAR(15),CUSTOMER_PHNO VARCHAR(10),
CUSTOMER_ADDRESS VARCHAR(40),CUSTOMER_EMAIL VARCHAR(30),CUSTOMER_LOCATION VARCHAR(15),CUSTOMER_USERNAME VARCHAR(10));
from t_xbbnhfn_customerdetails;
insert into T_XBBNHFN_CUSTOMERDETAILS values(20,'Vidya'... |
DROP TABLE IF EXISTS books;
CREATE TABLE books
(
id SERIAL PRIMARY KEY,
image VARCHAR(255),
title VARCHAR(255),
author VARCHAR(255),
des TEXT,
isbn VARCHAR(255),
bookshelf VARCHAR(255)
);
INSERT INTO books
(image, title, author, des, isbn, bookshelf)
VALUES
(
'http://books.... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50703
Source Host : localhost:3306
Source Database : taomall
Target Server Type : MYSQL
Target Server Version : 50703
File Encoding : 65001
Date: 2018-07-24 21:18:44
*/
SET FOREIGN_KEY_... |
-- get container name
SELECT SYS_CONTEXT ('USERENV', 'CON_NAME') FROM DUAL;
-- make sure seed is shown in CDB views
alter session set "_exclude_seed_cdb_view"=false;
alter session set exclude_seed_cdb_view=false; |
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
CREATE EXTENSION pg_trgm;
CREATE TABLE companies (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
ic_id VARCHAR(63) NOT NULL UNIQUE,
created TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
login_url VARCHAR(255),
has_support BOOLEAN DEFAULT FALSE,
detai... |
#1. Find the birth date and position of every player whose name starts with the letter T.
SELECT name,dob,position FROM player WHERE name LIKE "T%";
#2. Find all the players who are currently playing for the team named ”FC Barcelona”.
SELECT * FROM player WHERE current_tid = (SELECT tid FROM team WHERE name = ... |
CREATE TABLE IF NOT EXISTS omni_dash.illuminance(
Time DATETIME(0),
Value FLOAT,
PRIMARY KEY (Time)
);
CREATE TABLE IF NOT EXISTS omni_dash.humidity(
Time DATETIME(0),
Value FLOAT,
PRIMARY KEY (Time)
);
CREATE TABLE IF NOT EXISTS omni_dash.temperature(
Time DATETIME(0),
Value FLOAT,
PRIMARY... |
CREATE TABLE IF NOT EXISTS produto (
id INT AUTO_INCREMENT PRIMARY KEY,
descricao VARCHAR(30) NOT NULL UNIQUE,
valor FLOAT(10,2) NOT NULL,
data_inclusao TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
CHECK (valor >= 5)
);
INSERT INTO produto (descricao, valor) values ('CELULAR', 1200);
INSERT INTO produto (descricao, ... |
SELECT d.csm as "Account Owner",
d.account_name as "Account Name",
d.account_id as "Account Id",
n.email as "Email",
d.account_hq_location as "Region",
d.days_in_onboarding as "Days in Onboarding",
n.date_submitted as "Date Submitted",
d.segment as "Segment",
n.s... |
-- QUERIES ON ART DATABASE
-- JOINS AND SUB-QUERIES
-- Load the art_joins_START.sql script in a root connection and run it
-- to create the database. This will create a small database about artists and paintings.
-- Make art the active database
use art;
-- Explore the contents of the different tables
select * from ... |
CREATE DATABASE jQuizful;
CREATE TYPE gend AS ENUM ('Male', 'Female');
CREATE TABLE IF NOT EXISTS user(
id INT SERIAL PRIMARY KEY NOT NULL,
userName CHAR(50) NOT NULL,
password CHAR(50) NOT NULL,
email CHAR(50) NOT NULL,
gender gend NOT NULL
);
INSERT INTO user(userName, password, email, gender) VAL... |
INSERT INTO Autogiro
(
Email,
Reporter,
FirstName,
LastName,
PersonalIdentityNumber,
Bank,
ClearingNumber,
AccountNunmber,
Debtor,
TimeStamp,
Location,
Signature,
PostalCode,
Street,
PostalAddress
)
VALUES
(
@Email,
@Reporter,
@FirstName,
@LastName,
... |
DROP TABLE switch_table;
CREATE TABLE switch_table (
switch_col int
);
INSERT INTO switch_table VALUES (1) |
select x.department_name 部门名称, y.apply_num 申请设班单量,
z.plan_num 邀约量, z.trial_num 出席量,
xx.new_deal_num 新线索成单量, xx.new_deal_amount 新线索成单额,
yy.new_keys 新线索量
from (
select date_sub(curdate(),interval 1 day) stats_date,
cdme.department_name
from bidata.charlie_dept_month_end cdme
where cdme.stats_date = c... |
/* Formatted on 17/06/2014 18:12:01 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRES_CL_CODIVA
(
VAL_SCHEMA_IVA,
COD_IVA,
DESC_IVA,
VAL_PERC_IVA
)
AS
SELECT -- 20121026 AG filtro su flg_attivo
val_schema_iva,
cod_iva,
... |
-- +goose Up
-- SQL in section 'Up' is executed when this migration is applied
create table if not exists island (
id serial PRIMARY KEY,
nickname varchar(89),
name varchar(80),
logo_id int4,
description text,
category varchar(20),
mobility_type varchar... |
# Del valeur 3/6 : Del Document-Valeur
DELETE FROM `document_valeur_champ`
WHERE
`fk_client` = :client
AND `fk_document` = :filename
;
|
Create Schema Proyecto2012
select Proyecto2012
Create Table Empresa(
EmpresaID int,
Nombre varchar(50),
Aportacion int
);
Create Table TiendaEmpresa(
TiendaID int,
EmpresaID int
);
Create Table Tienda(
TinedaID int,
Nombre varchar(50),
Encargado varchar(50),
Direccion varchar(50)
);
Create Table Soc... |
create table answer_votes
(
id bigint auto_increment
primary key,
is_upvote tinyint(1) null,
answer_id bigint null,
user_id bigint null,
update_at bigint null
); |
/*
################################################################################
Creating Weekly Reports table
author: Tudor Groza
date: 9 October 2020
version: 2.6.0.001
################################################################################
*/
------------------------------------------------------... |
SELECT id,
generator_public_key,
TIMESTAMP
FROM blocks
ORDER BY TIMESTAMP DESC LIMIT ${limit}
|
CREATE PROC [ERP].[Usp_Del_Chofer]
@ID INT
AS
BEGIN
DELETE FROM ERP.Chofer WHERE ID=@ID
END
|
CREATE TABLE `brand` (
`brand_id` int(11) NOT NULL AUTO_INCREMENT,
`brand_name` varchar(45) NOT NULL,
`brand_description` text NOT NULL,
PRIMARY KEY (`brand_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
SELECT * FROM globo_portal_qa.current_endpoints where user_id = 69229 or user_id=69218; -- tel_agent_g1
SELECT * FROM globo_portal_qa.current_endpoints where user_id=69218; -- tel_agent_g1 |
-- phpMyAdmin SQL Dump
-- version 3.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Feb 01, 2013 at 06:46 AM
-- Server version: 5.5.25a
-- PHP Version: 5.4.4
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*... |
SELECT
vie.ID,
vie.license_number,
vie.license_date,
vie.order_date,
vie.order_number,
vie.caption,
vie.org_unit_id,
vie.address_id,
vie.street_id,
vie.street_name,
vie.city_id,
vie.city_name,
vie.city_enum,
vie.region_id,
vie.region_name,
vie.post_index,
vie.building,
vie.address_type,
vie.district... |
select*from user_procedures;
drop function plus;
-- 주민번호의 유효성 검증
select check_ssn('880101-123456'),
check_ssn('88010-1123456'),
check_ssn('880101-1233456'),
check_ssn('8801011123456')
from dual;
select * from CLASS4_INFO;
update class4_info
set ssn = '8801011234567'
where num = 7;
s
c... |
ALTER TABLE tree DROP FOREIGN KEY FKjed8d2kn7wiooy5rlfiqsee21;
ALTER TABLE tree DROP FOREIGN KEY fk_tree_chief_executive_id_present_position_id; |
PROCEDURE PI_AGENDAMENTO_DEVOLUTIVA
(
P_CD_ELO_AGENDAMENTO IN VND.ELO_AGENDAMENTO.CD_ELO_AGENDAMENTO%TYPE
)
IS
V_CD_ELO_STATUS_FROZZEN VND.ELO_STATUS.CD_ELO_STATUS%TYPE;
V_BATCH_ID VARCHAR2(10);
V_CD_ELO_AGENDAMENTO VND.ELO_AGENDAMENTO.CD_ELO_AGENDAMENTO%TYPE;
PROCEDURE INICIAR_DEVOLUTIVA
(PI_CD_ELO_AGENDAMEN... |
-- Exercice 2 (3pt) : SQL (BDD Bibliotheque) (30 min)
-- Dans un fichier ecrire une requete (jointure) permettant d'afficher toutes personnes ayant emprunté le livre une vie de Guy de Maupassant:
-- - prenom - auteur - titre du livre - date d'emprunt - date de rendu
-- Jointure INTERNE (avec JOIN) ... |
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS articles;
CREATE TABLE departments (
id int NOT NULL AUTO_INCREMENT,
name varchar(50) NOT NULL,
head_name varchar (50) NOT NULL ,
PRIMARY KEY (id)
);
CREATE TABLE lectors (
id int NOT NULL AUTO_INCREMENT,
... |
CREATE TABLE `CS3152SP21_sailia`.`Items`
( `id` INT NOT NULL ,
`name` VARCHAR(50) NOT NULL ,
`price``` REAL NOT NULL ,
`items_to_restrictions_id` INT NOT NULL ,
PRIMARY KEY (`id`)
)
CREATE TABLE Items (
ItemID int NOT NULL,
OrderID int NOT NULL,
Name... |
create table houses(
id serial primary key,
name varchar(30),
address varchar(100),
city varchar(100),
state varchar(2),
zip integer
);
insert into houses(name, address, city, state, zip)
values('Ricky', '1 DevMountain', 'Provo', 'UT', 84061);
alter table houses
add column img text,
add colu... |
ALTER TABLE wallet
ALTER COLUMN addr SET DATA TYPE text USING encode(addr, 'escape'); |
select
product_t.productid,
productdescription,
sum(quantityRequired) as maxiumQuantityRequired
from product_t
inner join uses_t
on product_t.productid = uses_t.prodid
inner join rawmaterial_t
on uses_t.materialid = rawmaterial_t.materialid
group by product_t.productid
order by maxiumQuantityRequired desc
limit ... |
SELECT Actor1CountryCode, Actor2CountryCode, Year, Count(EventCode) as ECount, AVERAGE(QuadClass) as AvgQuadClass
FROM [gdelt-bq:full.events]
WHERE (Actor1CountryCode = 'USA' OR Actor2CountryCode = 'USA') AND (Actor1CountryCode != Actor2CountryCode)
GROUP BY Actor1CountryCode, Actor2CountryCode, Year;
SELECT Actor1Co... |
SELECT c.CountryName, ct.ContinentName, COUNT(r.Id) AS RiversCount,
ISNULL(SUM(r.Length),0) AS TotalLength FROM Countries c
LEFT JOIN Continents ct
ON ct.ContinentCode = c.ContinentCode
LEFT JOIN CountriesRivers cr
ON cr.CountryCode = c.CountryCode
LEFT JOIN Rivers r
ON r.Id = cr.RiverId
GROUP BY c.CountryName, ct.Con... |
CREATE PROCEDURE generate_id(IN tablename VARCHAR(8), OUT id CHAR(10), OUT isunique BOOLEAN)
BEGIN
SELECT TRUE INTO isunique;
SELECT CONCAT(
substring('ABCDEFGHIJKLMNOPQRSTUVWXYZqwertyuiopasdfghjklzxcvbnm0123456789', rand(@seed:=round(rand(UNIX_TIMESTAMP(CURRENT_TIMESTAMP()))*4294967296))*62+1, 1),
... |
-- --------------------------------------------------------
-- Host: 127.0.0.1
-- Server version: 10.1.17-MariaDB - mariadb.org binary distribution
-- Server OS: Win64
-- HeidiSQL Version: 9.1.0.4867
-- -------------------------------------------... |
delete from site_attribute_action;
delete from action;
|
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 24, 2019 at 06:00 AM
-- Server version: 5.6.21
-- PHP Version: 5.5.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.1
-- Dumped by pg_dump version 12.1
-- Started on 2020-03-16 21:29:35
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalo... |
-- phpMyAdmin SQL Dump
-- version 4.7.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Nov 16, 2017 at 12:40 AM
-- Server version: 5.6.35
-- PHP Version: 7.1.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `turismo`
--
-- ----------------------------... |
CREATE TABLE expense
(
id INT NOT NULL AUTO_INCREMENT,
date TIMESTAMP NOT NULL,
category VARCHAR(50) NOT NULL,
sub_category VARCHAR(50) NOT NULL,
vendor VARCHAR(100),
description VARCHAR(100),
amount DECIMAL(5,2) NOT NULL,
PRIMARY KEY (id)
);
Create TABLE category
(
id INT NOT NULL AUTO_INCREMENT,
... |
/*
Let's see if we don't know the same thing:
*/
SELECT CASE WHEN NULL = NULL THEN 'We Know NULLs!'
WHEN NULL = 'Elephant' THEN 'NULL elephant here.'
WHEN NULL = 1 THEN '1 NULL to rule them.'
WHEN NULL = 0.1 THEN 'A FractioNULL.'
ELSE 'Who NULLs?'
END AS '... |
# Signup : user
INSERT INTO `user` (
`login_user`,
`mdp_user`,
`mail_user`,
`niveau_user`,
`fk_client`,
`clef_user`
) VALUES (
:login,
:password,
:mail,
30,
:idclient,
:clef
);
|
/*
Navicat MySQL Data Transfer
Source Server : localhost_3306
Source Server Version : 50714
Source Host : localhost:3306
Source Database : javatest
Target Server Type : MYSQL
Target Server Version : 50714
File Encoding : 65001
Date: 2020-03-14 17:01:40
*/
SET FOREIGN_KEY_CHECKS=0;... |
/* Chapter 3: The FROM Clause */
/* parsing syntax error */
SELECT name, id FROM teans WHERE conference = 'F'
;
/* Results should be a syntax error, similar to:
"Table 'teans' doesn't exist."
or:
"Invalid object name 'teans'."
*/ |
CREATE TABLE "hero"(
"id_hero" Serial NOT NULL,
"nm_hero" Character varying(100) NOT NULL
);
ALTER TABLE "hero" ADD CONSTRAINT "pk_hero" PRIMARY KEY ("id_hero"); |
-- ----------------------------
-- Table structure for dashboard_user
-- ----------------------------
DROP TABLE IF EXISTS `dashboard_user`;
CREATE TABLE `dashboard_user` (
`id` varchar(128) NOT NULL COMMENT '主键id',
`user_name` varchar(64) NOT NULL COMMENT '用户名',
`password` varchar(128) DEFAULT NULL COMMENT '用... |
-- DELETE CONTEXT
-- ***********************************************************
-- * *
-- * NOTE: BE VERY CAREFUL TO HAVE THE CORRECT CONTEXT!! *
-- * RUN WITH SELECT BEFORE UNCOMMENTING DELETE!!! *
-- * ... |
--liquibase formatted sql
--changeset ggorosito splitStatements:false
-- Agrego campo de abreviaturas en la tabla de Unidad de Medidas
ALTER TABLE measure_unit
ADD COLUMN abbreviation character varying(5) ;
-- Actualizo los valores actuales:
UPDATE measure_unit SET abbreviation = 'Kg.' WHERE id = 1;
... |
create table piezas (
idPieza int NOT NULL AUTO_INCREMENT,
landing varchar(100) NOT NULL,
primary key (idPieza)
);
create table medios (
idMedio int not null auto_increment,
descr varchar(30),
primary key (idMedio)
);
create table llamados (
idLlamado int not null auto_increment,
idLead int,
fechaHora Datet... |
CREATE TABLE R (A int, B int) FROM FILE 'test/r.dat' USING CSV;
CREATE TABLE S (B int, C int) FROM FILE 'test/r.dat' USING CSV;
SELECT A, COUNT(*) FROM R, S GROUP BY A;
SELECT A, R.B, COUNT(*) FROM R, S GROUP BY A, R.B;
SELECT A, R.B, C, COUNT(*) FROM R, S GROUP BY A, R.B, C; |
DROP TABLE ALLERGY;
CREATE TABLE ALLERGY
(PATIENTNUM CHAR(6) NOT NULL,
ANAPHYLACTOGEN VARCHAR2(15) NOT NULL,
STARTDATE DATE,
PRIMARY KEY (PATIENTNUM,ANAPHYLACTOGEN));
INSERT INTO ALLERGY VALUES
('663939','Penicillin','26-Nov-97');
INSERT INTO ALLERGY VALUES
('919635','Pollen','22-Nov-97');
INSERT INTO AL... |
DELETE FROM
FINANCIAL_STATEMENTS_ORIGINAL_TEMP
WHERE
SEQ_NO = /*sessionId*/'' |
CREATE TABLE `contact` (
`email` varchar(255) NOT NULL,
`sex` varchar(1) DEFAULT NULL,
`name_first` varchar(255) DEFAULT NULL,
`name_last` varchar(255) DEFAULT NULL,
`organization` varchar(255) DEFAULT NULL,
`updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`email`... |
-- phpMyAdmin SQL Dump
-- version 4.8.4
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le : Dim 31 mars 2019 à 19:01
-- Version du serveur : 10.1.37-MariaDB
-- Version de PHP : 7.3.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 ... |
CREATE DATABASE IF NOT EXISTS `cafe` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `cafe`;
-- MySQL dump 10.13 Distrib 8.0.18, for macos10.14 (x86_64)
--
-- Host: localhost Database: cafe
-- ------------------------------------------------------
-- Ser... |
INSERT INTO `agencias` (`id`, `nombre_ag`, `identificador`) VALUES
(1, 'SAN BERNARDINO', 'SB'),
(2, 'EL CUARTEL', 'EC');
INSERT INTO `perfilusuario` (`id`, `perfilUsuario`) VALUES
(1, 'SUPER_U'),
(2, 'ADMIN_DB'),
(3, 'ASESOR');
INSERT INTO `pregunta` (`id`, `pregunta`) VALUES
(1, '¿CUAL FUE EL NOMBRE DE TU PRIMERA MA... |
DROP TABLE default.INSTALL_LOCATION_PANEL ;
CREATE TABLE default.INSTALL_LOCATION_PANEL (
device_hash string ,
device_name string ,
change_date string ,
panel string ,
power_type string ,
power_usage string ,
phase_wire string ,
cat_a string ,
w... |
-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROC... |
delimiter $$
drop trigger trg_calendar_insert$$
create trigger trg_calendar_insert before insert on calendar FOR EACH ROW
begin
-- insert into debug_output values (new.start);
-- insert into debug_output values (new.end);
if new.end is not null and new.start is not null then
set new.weeks = ... |
CREATE TABLE [dwh].[CustomerWarehouseLink]
(
[CustomerId] Int
, [WarehouseId] Int
, [DateId] Int
, [IsFirstDate] Bit
, [IsLastDate] Bit
)
CREATE INDEX [IX_CustomerWarehouseLink_DateId]
ON [dwh].[CustomerWarehouseLink]
(
[DateId]
)
INCLUDE
(
[CustomerId]
, [WarehouseId]
)
CREATE INDEX [FIX_CustomerW... |
select distinct age.* from vnd.elo_agendamento age
inner join vnd.elo_carteira_sap sa
on age.nu_carteira_version = sa.nu_carteira_version
where
age.cd_elo_status in (1,2,3,4,5,6,7,8)
and sa.dh_carteira > current_date - 27
and sa.nu_carteira_version in (
'20181020213111' , -- 10513 20/10/2018 congelad... |
drop table if exists t_article;
drop table if exists t_blog;
drop table if exists t_category;
drop table if exists t_user_role;
drop table if exists t_role;
drop table if exists t_user;
create table t_role (
id bigint(20) not null auto_increment,
name varchar(255) default null,
permissions varchar(... |
create view vwExpenseMonth
as
With
ExpenseMonth AS(
select ExpenseMonth as MonthId, sum(Value) as TotalExpenses
from Expense
group by ExpenseMonth
),
SavingsMonth AS(
select TransactionMonth as MonthId, sum(Value) as TotalSavings
from SavingsTransaction
group by TransactionMonth
)
select e.MonthId as ExpenseMon... |
alter table PLACEUR_USER add constraint FK_PLACEUR_USER_CITY foreign key (CITY_ID) references PLACEUR_CITY(ID);
alter table PLACEUR_USER add constraint FK_PLACEUR_USER_PICTURE foreign key (PICTURE_ID) references PLACEUR_PICTURE(ID);
create unique index IDX_PLACEUR_USER_UK_MAIL on PLACEUR_USER (MAIL) where DELETE_TS is ... |
-- Adminer 4.2.5 MySQL dump
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `comments`;
CREATE TABLE `comments` (
`coid` int(11) NOT NULL AUTO_INCREMENT,
`cid` int(11) DEFAULT NULL,
`text` text,
`time` int(11) DEFAULT NULL,
`... |
/* Formatted on 17/06/2014 18:17:12 (QP5 v5.227.12220.39754) */
CREATE OR REPLACE FORCE VIEW MCRE_OWN.VTMCRE0_APP_SCHEDA_ANAG_SNDG
(
DESC_NOME_CONTROPARTE,
COD_SNDG,
VAL_PARTITA_IVA,
COD_GRUPPO_ECONOMICO,
COD_GRUPPO_LEGAME,
VAL_ANA_GRE,
COD_COMPARTO,
DESC_COMPARTO,
NOME,
COGNOME,
COD_MA... |
SELECT YEAR(GETDATE()) AS 'aktualny rok',
2+3 AS 'suma',
'el'+'ko' AS 'napis';
SELECT CONVERT(MONEY,2.00/4.00);
SELECT DISTINCT stanowisko
FROM Pracownicy;
SELECT DISTINCT kierownik
FROM Projekty;
SELECT nazwisko,
placa
FROM Pracownicy
ORDER BY placa DESC;
SELECT nazwa,placa_min
FRO... |
if exists (select * from sysobjects where id = OBJECT_ID('[InStorages]') and OBJECTPROPERTY(id, 'IsUserTable') = 1)
DROP TABLE [InStorages]
CREATE TABLE [InStorages] (
[id] [int] NULL,
[PorductsCode] [varchar] (50) NULL,
[InStoragesNumber] [int] NULL,
[InStoragesTime] [datetime] NULL)
INSERT [InStorag... |
;WITH cte AS
(
SELECT ProductID, ListPrice
, (SELECT MIN(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS MinListPrice
, (SELECT MAX(ListPrice) FROM Production.Product WHERE ListPrice != 0) AS MaxListPrice
FROM Production.Product
WHERE ListPrice != 0
), ctest AS
(
SELECT ProductID, ListPrice
, (ListPr... |
UPDATE characters
SET character_name = $2,
level=$3,
experience=$4,
gold=$5
WHERE character_id = $1; |
insert into account(user_id,password,role,nick) values ( 'admin', '1234', 'ROLE_ADMIN', '관리자');
insert into account(user_id,password,role,nick) values ( 'arahansa', '1234', 'ROLE_USER', '사용자');
insert into member(name,age) values ( 'a101', 10);
insert into member(name,age) values ( 'a102', 15);
insert into member(name... |
-- phpMyAdmin SQL Dump
-- version 4.5.2
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 14, 2020 at 09:23 PM
-- Server version: 10.1.13-MariaDB
-- PHP Version: 5.6.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL... |
SQL Test 1
Update2
Update3
Update4
Update5
Update 6 |
--ADD PLANE DETAILS--
INSERT INTO Plane (id, make, model, age, seats,)
VALUES (/*id value*/, /*make*/,/*model*/,/*age*/, /*seat num*/);
--ADD PILOT DETAILS--
INSERT INTO Pilot(id, fullname, nationality,)
VALUES (/*id value*/, /*full name*/, /*nationality*/);
--ADD Flight DETAILS--
INSERT INTO Flight(fnum, cost, num_s... |
/*
Navicat MySQL Data Transfer
Source Server : 127.0.0.1
Source Server Version : 50553
Source Host : 127.0.0.1:3306
Source Database : jiankang
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2019-12-22 14:09:52
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
INSERT INTO client(name, CPF_CNPJ, city, country, UF, address, phone, email, person_type)
values ('ROBERTO', '02943047031', 'SANTA MARIA', 'BRAZIL', 'RS', 'JOAO GOULART', '53999739562', 'MENEGAIS1@GMAIL.COM',
'FISICA');
INSERT INTO client(name, CPF_CNPJ, city, country, UF, address, phone, email, person_type)
v... |
ALTER TABLE `lttx1_errorlog` RENAME TO `lttx1_error_log`;
ALTER TABLE `lttx1_acpnavigation` RENAME TO `lttx1_acp_navigation`;
ALTER TABLE `lttx1_buildingdependencies` RENAME TO `lttx1_building_dependencies`;
ALTER TABLE `lttx1_exploredependencies` RENAME TO `lttx1_explore_dependencies`;
ALTER TABLE `lttx1_explorere... |
# Sequel Pro dump
# Version 2492
# http://code.google.com/p/sequel-pro
#
# Host: 127.0.0.1 (MySQL 5.1.44)
# Database: ananas
# Generation Time: 2011-01-30 22:02:13 -0500
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CH... |
CREATE ROLE echo WITH ENCRYPTED PASSWORD 'echo';
ALTER ROLE echo WITH LOGIN;
CREATE DATABASE echo WITH OWNER=echo ENCODING='utf8';
GRANT ALL ON DATABASE echo TO echo;
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.