text stringlengths 6 9.38M |
|---|
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : mer. 06 jan. 2021 à 01:15
-- Version du serveur : 5.7.31
-- Version de PHP : 7.3.21
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
DROP TABLE IF EXISTS `utilisateu... |
drop database if exists intervention;
create database intervention;
use intervention;
create table client (
idclient int (3) not null auto_increment,
nom varchar(20),
prenom varchar (20),
adresse varchar(20),
primary key (idclient)
);
create table technicien (
idtech int (3) not null auto_increment,
... |
rem
rem
Rem Copyright (c) 1995, 1996 by Oracle Corporation. All rights reserved.
Rem NAME
Rem privutil.sql - package of various OWA utility procedures
Rem DESCRIPTION
Rem This file contains one package:
Rem owa_util - Utitility procedures/functions for use
Rem with the ... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Hôte : 127.0.0.1:3306
-- Généré le : jeu. 08 mars 2018 à 14:08
-- Version du serveur : 5.7.19
-- Version de PHP : 7.1.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET... |
INSERT INTO SCHOOL.SCHOOL_TEACHER (SCHOOL_ID, TEACHER_ID) VALUES (1, 1);
INSERT INTO SCHOOL.SCHOOL_TEACHER (SCHOOL_ID, TEACHER_ID) VALUES (1, 2);
INSERT INTO SCHOOL.SCHOOL_TEACHER (SCHOOL_ID, TEACHER_ID) VALUES (1, 3);
INSERT INTO SCHOOL.SCHOOL_TEACHER (SCHOOL_ID, TEACHER_ID) VALUES (1, 4);
INSERT INTO SCHOOL.SCHOOL_TE... |
-- This is the schema file that the database is initialized with. It is specific to the H2 SQL dialect.
-- Author: Rasmus Ros, rasmus.ros@cs.lth.se
DROP TABLE IF EXISTS user_role;
DROP TABLE IF EXISTS users;
DROP TABLE IF EXISTS locations;
DROP TABLE IF EXISTS rides;
DROP TABLE IF EXISTS ride_passengers;
DROP TABLE IF ... |
SELECT l_extendedprice, l_discount
FROM lineitem
WHERE '1994-01-01'<l_shipdate AND '1994-02-01'>l_shipdate
|
CREATE TABLE [AsData_PL].[Comt_StandardOption]
(
[StandardUId] [nvarchar](20) NOT NULL,
[Option] [nvarchar](200) NULL,
[AsDm_UpdatedDateTime] datetime2 default getdate()
)
|
DROP PROCEDURE CPI.GICLS032_PROCESS_ADVISE_HDR;
CREATE OR REPLACE PROCEDURE CPI.gicls032_process_advise_hdr (
p_claim_id gicl_claims.claim_id%TYPE,
p_advice_id OUT gicl_advice.advice_id%TYPE,
p_net_amt gicl_advice.net_amt%TYPE,
p_paid_amt gicl_advice.paid... |
drop database if exists student_management;
create database if not exists student_management;
use student_management;
create table student(
id int not null auto_increment primary key,
`name` varchar(40) null,
age int null,
country varchar(40)
); |
SELECT
h2.name AS "objectcsid",
cc.objectnumber,
h1.name AS "mediacsid",
mc.description,
bc.name,
mc.creator creatorRefname,
REGEXP_REPLACE(mc.creator, '^.*\)''(.... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 05, 2019 at 05:00 PM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OL... |
create table if not exists marketplace (
id BIGSERIAL NOT NULL CONSTRAINT marketplace_pk PRIMARY KEY,
marketplace text
);
create table if not exists listing_status (
id BIGSERIAL NOT NULL CONSTRAINT listing_status_pk PRIMARY KEY,
status text
); |
declare
v_result number;
v_workbasketid number;
v_permissioncode nvarchar2(255);
v_isdeleted number;
begin
v_isdeleted := :IsDeleted;
v_workbasketid := :WorkbasketId;
v_permissioncode := :PermissionCode;
begin
select allowed into v_result from table(f_DCM_getAccSubjectAccessFn(p_AccessObjectId => (s... |
drop table if exists dbo.tb253
;
select
dense_rank() over (order by clientid) as rank
,count(*) over (partition by clientid) as cnt
,*
into dbo.tb253
from doc.ClientDocumentMetadata
where ClientId in
(
select
ClientId
from [Doc].[ClientDocumentMetadata]
where Do... |
select id, name
from products
where price < 10
or price > 100
|
alter table taobao add COLUMN newsite varchar(255);
|
/*
SQLyog Ultimate v12.4.3 (64 bit)
MySQL - 10.3.12-MariaDB-1:10.3.12+maria~xenial : Database - acl
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_F... |
CREATE TABLE login (
email varchar(254) NOT NULL,
code smallint NOT NULL DEFAULT trunc(random()*9999), -- 0...9999
created_at timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
);
CREATE UNIQUE INDEX on login (lower(email));
|
-- 4. Add code that increments the salary by 5% per year (Compound interest)
DECLARE
v_name VARCHAR2(45) := 'Larry Ellison';
v_starting_salary NUMBER := 1;
v_current_salary number := v_starting_salary;
v_new_salary number := 0;
v_raise_amt number := 0.05;
v_start_date DATE := sysdate;
v_cur... |
/*************************************************************************************************
|| QUERY INFORMATION
||
|| Department: Data Warehouse
|| Programmer: Luis Fuentes
|| Date: 10/26/2019
|| Category: SQL Change
||
|| Description: Change SQL
|| Parameters: None
... |
update test_run_result
set test_count = ?
where str_id = ?
|
UPDATE USERS SET login='smsuser' WHERE ID=3 |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 07-06-2016 a las 16:00:39
-- Versión del servidor: 10.1.9-MariaDB
-- Versión de PHP: 5.6.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=... |
--
-- PostgreSQL database dump
--
-- Dumped from database version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)
-- Dumped by pg_dump version 10.10 (Ubuntu 10.10-0ubuntu0.18.04.1)
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming... |
--Customers-------------------------------------------------
ALTER TABLE IF EXISTS ONLY public.regdCustomer
DROP CONSTRAINT IF EXISTS pk_regdCustomer_id CASCADE;
DROP TABLE IF EXISTS public.regdCustomer cascade;
DROP SEQUENCE IF EXISTS public.regdCustomer cascade;
CREATE TABLE regdCustomer
(
id SERIAL NOT NULL,
... |
CREATE TABLE midia (
id serial PRIMARY KEY,
nome varchar(60) NOT NULL,
tipo int,
FOREIGN KEY (tipo) REFERENCES tipo(idTipo),
autor int,
FOREIGN KEY (autor) REFERENCES autor(idAutor),
status varchar(20),
datatermino date,
avaliacao varchar(500),
nota int NOT NULL,
usuario int,
FOREIGN KEY (usuario) REFEREN... |
CREATE TABLE MEMBRES (
CODE_MEMBRE NUMBER NOT NULL ENABLE,
NOM VARCHAR2(30 BYTE),
PRENOM VARCHAR2(30 BYTE),
ADRESSE VARCHAR2(50 BYTE),
STATUS VARCHAR2(10 BYTE),
REVENUE_ANNUEL NUMBER(8,2),
CONSTRAINT MEMBRES_PK PRIMARY KEY (CODE_MEMBRE)
);
|
0 select_stmt None
0 SELECT <type 'str'>
1 all_or_distinct None
0 None <type 'NoneType'>
2 select_expr_list [(['user_id'], None), (['name'], None), ([('func', 'count', [['*']])], 'cnt')]
0 select_expr_list [(['user_id'], None), (['name'], None)]
0 select_expr_list [(['user_id'], None)]
... |
CREATE TABLE BOARD (
seq INT GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
id VARCHAR(20) NOT NULL,
ip VARCHAR(50) NOT NULL,
password INT NOT NULL
); |
Select c.Name, c.City, s.Name
from customer c
inner join
state s
on c.State = s.Code |
/****** Object: Table ActiveInvoices ******/
CREATE TABLE ActiveInvoices(
InvoiceID int IDENTITY(1,1) NOT NULL,
VendorID int NOT NULL,
InvoiceNumber varchar(50) NOT NULL,
InvoiceDate smalldatetime NOT NULL,
InvoiceTotal money NOT NULL,
PaymentTotal money NOT NULL,
CreditTotal money NOT NULL,
TermsID int ... |
set lines 150
column member format a66
column group# format 999999
select a.group#, a.status, a.bytes/1024/1024 SizeMB, b.member
from v$log a, v$logfile b
where a.group#=b.group# order by group#;
|
-- operate of system table
create table if not exists tb_os (
id bigint not null auto_increment,
-- code of os
os_code varchar(255) default null,
-- os of name
os_name varchar(255) default null,
-- os of version
os_version varchar(100) default null,
-- device type of os
device_type varchar(255) default NULL,
... |
-- point 9
-- create second_table table
CREATE TABLE IF NOT EXISTS second_table(id INTEGER, name VARCHAR(256), score INTEGER);
INSERT INTO second_table VALUES (1, "John", 10), (2, "Alex", 3), (3, "Bob", 14), (4, "George", 8);
|
INSERT INTO characters (id,name,motto,species,author_id,series_id)
VALUES (1,'Bob','Hey','Human',1,1)
,(2,'Sally','Where were you anyway','Human',1,1)
,(3,'Erin','Yo','Human',1,1)
,(4,'Carl','I can fly','Dragon',1,1)
,(5,'Meg','RUN','Human',2,2)
,(6,'Zadie','mmMMmMMaaarrrgh','Zombie',2,2)
,(7,'Reid','AAAHHHH','Human',2... |
INSERT INTO access (
id_user,
last_name,
first_name,
access_time,
success,
code,
message
)
VALUES(
213,
"BERNET",
"Quentin",
"2017-05-21 11:24:00",
1,
"200",
"bien joué"
);
|
/* alias
=> 컬럼의 값을 추출할 때 이름을 지정하지 않으면 컬럼 이름을 그대로 사용한다.
=> 만약 컬럼 이름을 다른 이름으로 바꾸고 싶다면, 별명을 지정하라
=> 문법
select 컬럼명 as 별명, ...
*/
/* 컬럼에 별명을 부여하기
=> 별명에 공백이 있으면 따옴표 ('' 또는 "")로 감싸야 한다.
*/
select lno, crmno as classRoomNo, mrno managerNo, titl 'class name'
from lect;
/* 칼럼이 이름이 적합하지 않은 경우
코드에서 사용하기 쉽도록 이름을 저장한다. */
... |
CREATE TABLE [IDP].[C_PRUEBA] (
[ID_PRUEBA] INT IDENTITY (1, 1) NOT NULL,
[CL_PRUEBA] NVARCHAR (20) NOT NULL,
[NB_PRUEBA] NVARCHAR (100) NOT NULL,
[ID_CUESTIONARIO] INT NOT NULL,
[NO_TIEMPO_PRUEBA] SMALLINT NOT NU... |
library "N3CCovid19Phenotype" version '1.4'
using QUICK
codesystem "ActCodes": 'http://hl7.org/fhir/v3/ActCode'
codesystem "LOINC": 'http://loinc.org'
codesystem "ICD-10": 'http://hl7.org/fhir/sid/icd-10'
codesystem "SNOMEDCT": 'http://snomed.info/sct'
codesystem "HCPCS": 'https://www.cms.gov/Medicare/Coding/HCPCS'
c... |
-- using an alias using 'as' keyword
select mov.title, mov.year, mov.rating
from movie as mov;
-- using an alias, using NO 'as' keyword
select m.title, m.year, m.rating
from movie m; |
CREATE TABLE `exams` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`term` varchar(18) COLLATE utf8mb4_unicode_ci NOT NULL,
`exam_type` varchar(18) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Denotes what type of exam the record is.',
`course_section_id` bigint(20) unsigned NOT NULL,
`created_at` timest... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 31, 2016 at 07:01 PM
-- Server version: 5.5.47-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_C... |
/******************************
SQL SERIES 2
Creare, utilizzando phpMyAdmin, un nuovo database hotel.
*******************************/
/*
Sempre utilizzando phpMyAdmin, come fatto per l’esercizio di ieri eseguire le seguenti queries:
*/
/* Come si chiamano gli ospiti che hanno fatto più di due prenotazioni? ... |
DROP TABLE IF EXISTS `sample_test`.`conversation`;
CREATE TABLE `sample_test`.`conversation` (
`id` varchar(40) NOT NULL,
`session_id` varchar(40) NOT NULL,
`data` blob,
`expired_at` datetime NOT NULL,
`created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` ... |
DELIMITER $$
DROP PROCEDURE IF EXISTS mum_user_drop $$
CREATE DEFINER=`root`@`localhost`
PROCEDURE mum_user_drop(IN mum_username CHAR(16))
LANGUAGE SQL
NOT DETERMINISTIC
MODIFIES SQL DATA
SQL SECURITY DEFINER
COMMENT 'Delete and existing user from MySQL and MUM'
mum_drop_sp:BEGIN
SET @mysql_user = mum_username;
--... |
/*Пусть в таблице users поля created_at и updated_at
оказались незаполненными. Заполните их текущими датой
и временем.*/
-- таблица users не имеет данных полей. Сначала добавим
-- пустые поля created_at, updated_at
ALTER TABLE users
ADD created_at DATETIME DEFAULT NULL,
ADD updated_at DATETIME DEFAULT NULL;
-... |
UPDATE Artist
SET DateDied="1519-5-2"
WHERE Name="Leonardo da Vinci";
-- Update the date that the artist has died. Sad day. |
select CAZXNB,i0rhcd,caducd, i0oncd,cacstx,i0lgtx,sum(d2dgva)
from Nomis.S1018252.NOMDBF95.CUSPHY01
inner join Nomis.S1018252.NOMDBF95.CSMPHY01
on cazxnb = i0zxnb
INNER JOIN Nomis.S1018252.BOOKING.BPTPHY01
on d2zxnb = cazxnb
and d2rhcd = i0rhcd
where i0oncd <> caducd
and d2iyma = 2010
and left(i0oncd,1) in ... |
select
t.Title,
concat(cast(case
when month(t.DateFrom) = 1 then \'Enero\'
when month(t.DateFrom) = 2 then \'Febrero\'
when month(t.DateFrom) = 3 then \'Marzo\'
when month(t.DateFrom) = 4 then \'Abril\'
when month(t.DateFrom) = 5 then \'Mayo\'
when month(t.DateFrom) = 6 then \'Junio\'
when month(t.Date... |
delete from HtmlLabelIndex where id=27782
/
delete from HtmlLabelInfo where indexid=27782
/
INSERT INTO HtmlLabelIndex values(27782,'终端网点分级')
/
INSERT INTO HtmlLabelInfo VALUES(27782,'终端网点分级',7)
/
INSERT INTO HtmlLabelInfo VALUES(27782,'Terminal network classification',8)
/
INSERT INTO HtmlLabelInfo VALUES(27782,'... |
-- Import the database dump from hbtn_0d_tvshows to your MySQL server
-- script that lists all shows contained in hbtn_0d_tvshows that have at least one genre linked
SELECT sh.title, shgr.genre_id FROM tv_shows AS sh JOIN tv_show_genres AS shgr
ON sh.id=shgr.show_id ORDER BY sh.title, shgr.genre_id ASC;
|
update ACT_GE_PROPERTY set VALUE_ = '6.6.0.0' where NAME_ = 'common.schema.version';
alter table ACT_RU_ENTITYLINK add column ROOT_SCOPE_ID_ varchar(255);
alter table ACT_RU_ENTITYLINK add column ROOT_SCOPE_TYPE_ varchar(255);
create index ACT_IDX_ENT_LNK_ROOT_SCOPE on ACT_RU_ENTITYLINK(ROOT_SCOPE_ID_, ROOT_SCOPE_TYPE... |
-- Give me the names of all the actors in the movie 'Die Another Day'.
-- Please also make sure actor names are in this format:
-- <firstname> <lastname> (seperated by single space).
SELECT CONCAT(first, ' ', last) AS 'Cast of "Die Another Day":'
FROM Actor actr, Movie mov, MovieActor movActr
WHERE actr.id = movA... |
/*---------------------------------------------------- TRASPASOS -----------------*/
/* TIPO PERSONA*/
INSERT INTO tipoPersona (tipo)
SELECT tipo FROM temporal GROUP BY tipo; /* 2 tipos */
SELECT * FROM tipoPersona;
/* REGION */
INSERT INTO region (nombre)
SELECT region FROM temporal GROUP BY region; /* 20 regiones ... |
DROP DATABASE IF EXISTS FrequencyCounter;
CREATE DATABASE FrequencyCounter;
CREATE TABLE Counter(
counterID int NOT NULL AUTO_INCREMENT,
`long` FLOAT(10,6),
`lat` FLOAT(10,6),
`description` varchar(255) NOT NULL,
PRIMARY KEY (counterID)
);
CREATE TABLE Pedestrian(
time TIMESTAMP NOT NULL,
... |
-- NOTE: Las tablas deben contener Primary Key para poder generar correctamente el código
-- NOTE: Debe activar la salida por Output del editor PLSQL
set serveroutput on
CREATE TABLE MYTABLE1
(
Codigo VARCHAR2(30) NOT NULL,
Descripcion VARCHAR2(60) NOT NULL,
Fecha DATE,
Valor NUMBER(1... |
alter table `agreement` drop column `remark`;
|
UPDATE `creature_template` SET `ScriptName`='npc_ripsnarl' WHERE (`entry`='42635');
|
CREATE TABLE IF NOT EXISTS `{prefix}exchange1c` (
`id` int(4) unsigned NOT NULL AUTO_INCREMENT,
`object_id` int(4) unsigned NOT NULL AUTO_INCREMENT,
`object_type` int(11) DEFAULT NULL,
`external_id` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `object_type` (`object_type`),
KEY `external_id` ... |
# 保存系统初始化数据
# INSERT 语句
|
-- phpMyAdmin SQL Dump
-- version 3.3.9
-- http://www.phpmyadmin.net
--
-- Anamakine: localhost
-- Üretim Zamanı: 21 Ocak 2012 saat 20:26:13
-- Sunucu sürümü: 5.5.8
-- PHP Sürümü: 5.3.5
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER... |
-- 0426
ALTER TABLE mgt_data_td_preloan_report ADD COLUMN apply_id int comment '申请借款ID';
ALTER TABLE mgt_accounts ADD COLUMN is_deleted tinyint default 0 comment '是否删除';
ALTER TABLE mgt_channels ADD COLUMN receive_mode int comment '进件模式:1 注册;2 进件';
ALTER TABLE mgt_data_club_preloan_report ADD COLUMN user_id int c... |
INSERT INTO
users (email, encrypted_password, bio)
VALUES
('bob@bob.com', '$2a$06$IXZlu18nkWvuCY8aRLixLu6msCgx1q2kWxuiUY7fCTMAceEflcXwe', 'Cuz I is a boss');
INSERT INTO
tasks (user_id, rank, task, sub_task, due_date, is_important, is_work, is_complete)
VALUES
(1, 0, 'eat a pidgoen', 'flying rats', '1/1/2017',... |
-- MySQL Script generated by MySQL Workbench
-- Sun Apr 1 21:57:21 2018
-- Model: New Model Version: 1.0
-- MySQL Workbench Forward Engineering
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TR... |
-- phpMyAdmin SQL Dump
-- version 4.6.5.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:8889
-- Generation Time: Jan 22, 2018 at 07:34 PM
-- Server version: 5.6.35
-- PHP Version: 7.1.1
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
alter table "public"."assets" rename column "asset_type" to "assetType";
|
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 02 Mei 2017 pada 03.07
-- Versi Server: 10.1.13-MariaDB
-- PHP Version: 5.5.37
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT... |
SELECT name
FROM distrib
WHERE id_distrib = 42
OR (id_distrib BETWEEN 62 AND 69)
OR id_distrib = 71
OR (id_distrib BETWEEN 88 AND 90)
OR LENGTH(LOWER(name)) - LENGTH(REPLACE(LOWER(name), 'y', '')) = 2
LIMIT 2, 5;
|
INSERT INTO items (description, price) VALUES('Panasonic', 800);
INSERT INTO items (description, price) VALUES('Sony', 700);
INSERT INTO items (description, price) VALUES('Apple', 1000);
INSERT INTO items (description, price) VALUES('Sony Notebook', 1000);
INSERT INTO items (description, price) VALUES('Hewlett Packard'... |
-- +goose Up
create table if not exists dbo.news_and_files
(
id uuid not null primary key,
news_id uuid not null references dbo.news (id),
file_id uuid not null references dbo.files (id)
);
alter table dbo.news_and_files
owner to appleadmin;
-- +goose Down
drop table if exists dbo.news_and_files; |
use yasl;
create table favorites_artist(
id int unsigned not null auto_increment primary key,
user_id int unsigned not null,
artist_id int unsigned not null);
|
ALTER TABLE programa DROP COLUMN paralelo_id CASCADE;
ALTER TABLE programa ADD COLUMN paralelos INTEGER NOT NULL;
ALTER TABLE programa ADD COLUMN numero_de_estudiantes INTEGER NOT NULL;
ALTER TABLE programa ADD COLUMN cohortes_por_ano INTEGER NOT NULL;
DROP TABLE paralelo CASCADE; |
/*
Navicat Premium Data Transfer
Source Server : onecode
Source Server Type : MySQL
Source Server Version : 50634
Source Host : rm-2ze5j8d581v6qhj1ao.mysql.rds.aliyuncs.com
Source Database : onecode
Target Server Type : MySQL
Target Server Version : 50634
File Encoding :... |
DECLARE
v_teamID tbl_map_workbasketteam.col_map_wb_tm_team%TYPE;
BEGIN
BEGIN
SELECT tem.col_map_wb_tm_team
INTO v_teamID
FROM tbl_externalparty ep,
tbl_map_workbasketteam tem,
vw_users u
WHERE ep.col_externalpartyworkbasket = tem.col_map_wb_tm_workbasket
AND ep.... |
insert into status (value, reference_index, remaining) values ("free", "B1", 1);
insert into status (value, reference_index, remaining) values ("associated", "B1", 2);
insert into status (value, reference_index, remaining) values ("active", "B1", 3);
insert into user (username, status_id) values ("user", 1); |
delete from Album;
delete from AlbumAPourCategorie;
delete from APourInstrument;
delete from APourRole;
delete from Artiste;
delete from CategorieFilm;
delete from CategorieMusique;
delete from Client;
delete from Codec;
delete from EstUnePiste;
delete from EstUnFilm;
delete from Fichier;
delete from Film;
delete from ... |
CREATE TABLE Users(
UserId int,
First varchar(100),
LastName varchar(100),
City varchar(100)
); |
-- phpMyAdmin SQL Dump
-- version 4.0.3
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2015 年 08 月 29 日 18:17
-- 服务器版本: 5.5.42
-- PHP 版本: 5.3.29
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_CHARACTER_S... |
/*
Navicat MySQL Data Transfer
Source Server : win
Source Server Version : 50727
Source Host : localhost:3306
Source Database : bug
Target Server Type : MYSQL
Target Server Version : 50727
File Encoding : 65001
Date: 2020-01-03 23:18:27
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----------... |
CREATE EXTERNAL TABLE `packt_serverless_analytics`.`nyc_taxi_partitioned`(
`vendorid` BIGINT,
`tpep_pickup_datetime` STRING,
`tpep_dropoff_datetime` STRING,
`passenger_count` BIGINT,
`trip_distance` DOUBLE,
`ratecodeid` BIGINT,
`store_and_fwd_flag` STRING,
`pulocationid` BIGINT,
`dolocationid`... |
drop table if exists first_video_engagement;
create table first_video_engagement as
select * from
(select user_id drupal_user_id,
first_value(vt.id) over w as suh_id,
first_value(vt.nid) over w as nid,
first_value(vt.extra_nid) over w as extra_nid,
first_value(to_timestamp(created)) over w as created_... |
-- phpMyAdmin SQL Dump
-- version 4.2.11
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Mar 01, 2015 at 07:41 PM
-- Server version: 5.6.21
-- PHP Version: 5.6.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
... |
--
-- Licensed to the Apache Software Foundation (ASF) under one
-- or more contributor license agreements. See the NOTICE file
-- distributed with this work for additional information
-- regarding copyright ownership. The ASF licenses this file
-- to you under the Apache License, Version 2.0 (the
-- "License"); you ma... |
DROP PROCEDURE CPI.POPULATE_POLNREP2;
CREATE OR REPLACE PROCEDURE CPI.populate_polnrep2(
p_new_par_id gipi_polnrep.par_id%TYPE,
p_old_pol_id gipi_polnrep.old_policy_id%TYPE,
p_new_policy_id gipi_polnrep.new_policy_id%TYPE,
p_user gipi_polnrep.user_id%TYPE
)
IS
BEGIN
/*
** Created... |
INSERT INTO burger(burger_name, devoured)
VALUES
("Big Mac", false),
("Whopper", false),
("Filet O Fish", false); |
/*
Navicat Premium Data Transfer
Source Server : 本机
Source Server Type : MySQL
Source Server Version : 50719
Source Host : localhost
Source Database : brain
Target Server Type : MySQL
Target Server Version : 50719
File Encoding : utf-8
Date: 10/26/2017 18:50:43 PM
*/
... |
DROP PROCEDURE CPI.LOSS_RATIO_EXT_BY_LINE;
CREATE OR REPLACE PROCEDURE CPI.Loss_Ratio_Ext_By_Line (p_line_cd giis_line.line_cd%TYPE,
p_subline_cd giis_subline.subline_cd%TYPE,
p_iss_cd giis_issource.iss_cd%TYPE,
p_sessi... |
insert into tbl_comments
(comment_body,
event_id,
is_confidential)
values (empty_clob(), :event_id, :is_confidential)
returning comment_body into :comment_body
|
1. perintah dasar update join
2. update inner join
3. update IMPLISIT join
4. update left/right join
update table1 as a [inner join,left join,right join]
table2 as b [on a.id = b.id,using(id)]
set colum = value
where
kondisi
alter table barang add column jumlah varchar(50);
insert into barang(jumlah) values (1) wher... |
CREATE TABLE `t_rss_article` (
`id` int(11) NOT NULL auto_increment COMMENT '编号',
`stitle` varchar(100) default NULL COMMENT '网站标题',
`slink` varchar(500) default NULL COMMENT '网站网址',
`supdated` varchar(50) default NULL COMMENT '网站更新时间',
`etitle` varchar(500) default NULL COMMENT '文章标题',
`elink` varc... |
#=================TASK #1==================
drop procedure if exists get_facilities_by_type;
delimiter $$
create procedure get_facilities_by_type(IN type_name varchar(20))
begin
select f.id as 'ID',
f.name as 'Facility name',
ft.name as 'Type name',
a.name as 'Attribute name',
... |
SELECT
A.POSTID,
A.TITLE,
A.DESCR,
A.EFFDT
FROM POST A
WHERE A.EFF_STATUS='A'
ORDER BY A.EFFDT DESC LIMIT ?,? |
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2018-09-18 11:30:00 */
/*==============================================================*/
drop index Index_1 on paper_account;
drop table i... |
-- upgrade --
ALTER TABLE "event" RENAME TO "users";
-- downgrade --
ALTER TABLE "users" RENAME TO "event";
|
-- phpMyAdmin SQL Dump
-- version 3.4.10.1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2014 年 01 月 06 日 13:18
-- 服务器版本: 5.5.20
-- PHP 版本: 5.3.10
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_CHARACTER_... |
CREATE OR REPLACE PROCEDURE workflow_CurrentOperator_I
( requestid1 integer, userid1 integer, groupid1 in out integer,
workflowid1 integer, workflowtype1 integer, usertype1 integer, isremark1 char ,nodeid integer,agentorbyagentid integer,agenttype char,showorder integer,
flag out integer , ... |
/* Formatted on 2016/10/19 18:02 (Formatter Plus v4.8.8) */
SET SERVEROUTPUT ON
/*
** Created by : Benjo Brito
** Date Created : 10.19.2016
** Remarks : GENQA-SR-5784
*/
BEGIN
FOR i IN (SELECT trigger_name
FROM user_triggers
WHERE trigger_name IN
('TRGI_G... |
/*
SQLyog Ultimate v12.3.1 (64 bit)
MySQL - 5.5.20 : Database - ems
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@... |
/*新增领券活动*/
ALTER TABLE `lv_activity_link` ADD COLUMN `strategy_type` SMALLINT(3) DEFAULT NULL COMMENT '活动策略(1无限制,2登录限制,3IP限制)';
/*修复历史数据*/
UPDATE lv_activity_link SET strategy_type=2 WHERE strategy_type IS NULL; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.