text
stringlengths
6
9.38M
CREATE VIEW dvd_studio (title, dvd_release_date, sound, price, rating, studio) AS SELECT a.title, a.dvd_release_date, a.sound, a.price, a.rating, s.studio FROM Dvd a JOIN Studio_Junction_Table s ON a.title = s.title; CREATE VIEW movie_genre (title, imdb_user_rating, runtime_in_minutes, release_year, number...
ALTER TABLE AD_DEVICE CHANGE COLUMN GCM_TOKEN FCM_TOKEN VARCHAR(1000) NULL DEFAULT NULL; -- Run the following only if the both EMM 2.1.0 and IoT 3.3.1 has to run simultaneously. ALTER TABLE AD_DEVICE ADD COLUMN GCM_TOKEN VARCHAR(1000) NULL AFTER OS_BUILD_DATE;
DROP PROCEDURE IF EXISTS `lc_sp_provincias_parroquias`; DELIMITER $$ CREATE PROCEDURE lc_sp_provincias_parroquias( IN pProvinciaParroquia JSON, OUT records_affected JSON ) BEGIN DECLARE vJsonEsValido INT; DECLARE vJsonSalida json; DECLARE vItems INT; DECLARE vIndex BIGINT UNSIGNED DEFAULT 0; ...
/* Navicat MySQL Data Transfer Source Server Version : 50616 Target Server Type : MYSQL Target Server Version : 50616 File Encoding : 65001 Date: 2021-06-18 12:11:50 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for e_admin -- ---------------------------- DROP TABLE IF ...
----------------------------------- QUERY 3 ------------------------------------ -- Find the host/hosts with the highest average host rating. -- Report their email address, average host rating, and the price for the most -- expensive booking week they have every recorded. -----------------------------------------------...
-- 10.1 Join table PEOPLE and ADDRESS, but keep only one address information for each person (we don't mind which record we take for each person). select a.id, a.address, a.updatedate from address a, (select id, max(updatedate) up_date from address group by id) ma where a.id = ma.id and a.updatedate...
update ACT_GE_PROPERTY set VALUE_ = '6.5.0.4' where NAME_ = 'batch.schema.version';
set @str= (select group_concat(concat('truncate table ', table_name, ';') separator ' ') from information_schma.tables where table_schema= 'wwsg2'); prepare stmt from @str; execute stmt; deallocate prepare stmt;
/* Drop Tables */ DROP TABLE oa_leave; /* Create Tables */ CREATE TABLE oa_leave ( id varchar2(64) NOT NULL, process_instance_id varchar2(64), start_time timestamp, end_time timestamp, leave_type varchar2(20), reason varchar2(255), apply_time timestamp, reality_start_time timestamp, reality_end_time tim...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2021 at 03:53 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.3.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE TABLE IF NOT EXISTS public.sample ( id serial, val character varying(250), PRIMARY KEY (id) );
ALTER TABLE tb_usuarios ADD campanha_impel_down INT UNSIGNED NULL; ALTER TABLE tb_personagens ADD preso INT UNSIGNED DEFAULT 0 NULL; INSERT INTO tb_migrations (cod_migration) VALUE (88);
-- Remove old tables DROP TABLE IF EXISTS `reason_malloc`; DROP TABLE IF EXISTS `reason_free`; DROP TABLE IF EXISTS `reason_realloc`; DROP TABLE IF EXISTS `reason_calloc`; DROP TABLE IF EXISTS `memory_write`; DROP TABLE IF EXISTS `block`; DROP TABLE IF EXISTS `snapshot`; -- Create new CREATE TABLE `snapshot` ( `sn...
#QWERY a select avg_price_sql() as average_of_all_products; #QWERY b select title, price from products where price > avg_price_sql(); #QWERY c select title, price from products where price > avg_price_sql()*0.2; #QWERY d select title, price from products where price between avg_price_sql()*0.8 and avg_price_sql()*1....
select so.unique_sales_order_id, so.sales_order_number, so.order_date, --Requested delivery date defaults to revised_requested_delivery date when provided. --If not, and if the shipping_method is CUST PICKUP, returns invocie_date. Otherwise returns requested_delivery_date nvl( rrdd.revised_requested_d...
select p.TariffName ,count(*) as Total ,count(sl.OverdueStart) as WithOverdue ,count(*) - count(sl.OverdueStart) as WithoutOverdue from prd.vw_Product p outer apply ( select top 1 StartedOn as OverdueStart from prd.vw_statusLog sl where sl.ProductId = p.Productid and sl.Status = 4 ) ...
-- phpMyAdmin SQL Dump -- version 2.9.0.2 -- http://www.phpmyadmin.net -- -- Serveur: localhost -- Généré le : Lundi 23 Juin 2008 à 16:52 -- Version du serveur: 5.0.51 -- Version de PHP: 5.2.5 -- -- Base de données: `anixv2` -- -- -------------------------------------------------------- -- -- Structure de la tabl...
create table expense(id int not null auto_increment,expensetype varchar(100),expenseitem varchar(100),expensemoney int,expensedate varchar(100), primary key(id)); create table expensetype(expensetype varchar(100)); insert into expensetype values("Food"); insert into expens...
create table employee1( ssn int, name varchar(12), dno int, sal int ); insert into employee1 values(1,'Ishank',10,1000); insert into employee1 values(2,'Sharma',1,2000); insert into employee1 values(3,'Aman',12,3000); insert into employee1 values(4,'Bhatnagar',10,2500);
CREATE VIEW [AsData_PL].[DAS_AssessorAssessmentData] As SELECT CONVERT(VARCHAR(10), DATEADD(mm, DATEDIFF(mm, 0, DATEADD(mm, 0, cl.[EventTime])), 0), 120) AS [Month], cl.[EventTime], ce.[Uln] AS [Apprentice ULN], CONVERT(CHAR(10), ce.AchievementDate) AS [Achievement Date], UPPER(ce.StandardName) AS [Standard Name]...
/* ---------------------------------------------------- */ /* Generated by Enterprise Architect Version 12.1 */ /* Created On : 03-jun.-2018 2:10:53 a. m. */ /* DBMS : Oracle */ /* ---------------------------------------------------- */ /* Drop Tables */ begin EXECUTE IMMEDIATE 'DROP TABLE "CA...
-- STORE FUNCTION -- CREATE FUNCTION EXAMPLE -- LETS TAKE THE EXAMPLE OF CREATING A STORE FUNCTION, we will use the customers table -- in the sample database for the demonstration -- the following create function statement creates a function that returns -- the customer level based on credit create function Custome...
CREATE SCHEMA IF NOT EXISTS metrics_data; CREATE TABLE metrics_data.metric ( id BIGSERIAL PRIMARY KEY NOT NULL, name VARCHAR(50) NOT NULL, service_id BIGINT NOT NULL, architecture_id BIGINT NOT NULL, value ...
use employees; select first_name, last_name from employees where first_name in ('Irena', 'Vidya') # and last_name in ('Reutenauer', 'Demeyer') order by first_name; select first_name, last_name from employees where first_name in ('Irena', 'Vidya') order by last_name asc, first_name desc; select * from emp...
SELECT OwnerId FROM `serie` WHERE serie.id = :id;
-- views of published articles by people who read 5 - 50 articles per month SELECT cvo.consultant_id || ',' || cvo.object_id || ',' || 1 FROM consultant_viewed_objects cvo JOIN articles a ON cvo.object_id = a.id WHERE cvo.object_type = 'Article' AND cvo.created_at > CURRENT_DATE - INTERVAL '1 month' AND a...
/* * Napoleon-Christos Oikonomou AEM:7952 * Aggelos Vasileiadis AEM:8010 * Alexandros-Charalampos Kyprianidis AEM:8012 */ SELECT "RadioShow"."name","start_time","duration","theme" FROM "RadioShow" JOIN "Days" ON "RadioShow"."name" = "Days"."name" WHERE (((days = 'Monday' OR days = 'Tuesday' OR days = 'Wednesday...
--실습문제 2021.02.25 /* 1. 계열 정보를 저장할 카테고리 테이블을 만들려고 한다. 다음과 같은 테이블을 작성하시오. 테이블 이름 TB_CATEGORY 컬럼 NAME, VARCHAR2(10) USE_YN, CHAR(1), 기본값은 Y 가 들어가도록 */ create table tb_category( name varchar2(10), use_yn char(1) default 'Y' ); select * from tb_category; /* 2. 과목 구분을 저장핛 테이블을 맊들...
delete from tbl_group_trans where state_id_from = %1 and group_id = %2
SELECT * FROM hw1_table; SELECT AVG(close) FROM hw1_table; select AVG(high) from hw1_table where high > 40
/* A script to be executed at the start of the docker postgres image, which populates a db with sample data. It creates 900 pupils and 30 events. Each pupil has 80% chance to attend an event and 50% chance to bring some recyclables to that event */ -- create resource enum type do $$ begin if not exists...
-- Most Frequently Used proc/function SELECT TOP 20 DB_NAME(b.dbid) AS DatabaseName, b.text AS 'SP Name', a.execution_count AS 'Execution Count', a.execution_count/DATEDIFF(SECOND, a.creation_time, GETDATE()) AS 'Calls/Second', a.total_worker_time/a.execution_count AS 'AvgCPUTime', ...
SELECT (SUM(fac.total_egreso_mensuale)/COUNT(fac.id_ing_mensuales)) total FROM DatamartEgresos.agr_egresos_mensuales fac
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64) -- -- Host: 127.0.0.1 Database: students -- ------------------------------------------------------ -- Server version 8.0.15 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*...
select product_id, year as first_year, quantity, price from ( select *, dense_rank() over (partition by product_id order by year) as rk from sales ) a where rk = 1
CREATE OR REPLACE PROCEDURE EliminarProductoCategoria( idprod PERTENECE.IDPRODUCTO%TYPE, idcat PERTENECE.IDCATEGORIA%TYPE ) IS PROD_NO_EXISTS EXCEPTION; CAT_NO_EXISTS EXCEPTION; PROD_CAT_NO_REL EXCEPTION; CAT_IS_TODO EXCEPTION; cuenta NUMBER; BEGIN SELECT COUNT(*)...
-- Copyright 2015 Silicon Valley Data Science. -- -- Licensed under the Apache License, Version 2.0 (the "License"); -- you may not use this file except in compliance with the License. -- You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable la...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 22, 2017 at 02:04 AM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
# --- !Ups create table webauthn_keys ( user_id int null, user_handle CHAR(128), key_name VARCHAR(255), key_uid VARCHAR(255), key_cose VARCHAR(255), constraint webauthn_keys_pk primary key (user_handle, key_uid) ); create index webauthn_keys_user_handle_index on webauthn_keys (use...
-- phpMyAdmin SQL Dump -- version 3.5.2.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Jan 26, 2016 at 07:18 AM -- Server version: 5.5.27 -- PHP Version: 5.4.7 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
-- Create table deck_cards CREATE TABLE `deck_cards` ( `id` int NOT NULL AUTO_INCREMENT, `deck_id` int NOT NULL, `card_id` int NOT NULL, `status` tinyint(1) unsigned NOT NULL DEFAULT '1', `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Oct 25, 2014 at 11:16 PM -- Server version: 5.6.17 -- PHP Version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;...
INSERT INTO kitlab_users (name, username, password) VALUES ( 'Matt', 'TestUsername', '$2y$07$ymhZcvBawLv8lGu.AwkPOOLhbsxjxpAuVXn0wrFI3DYMV1D72D3yO' ), ( 'Ash', 'AshTestUsername123!', '$2y$07$N77G1SH3n..tpdjhgDzxsudsYhk.qgp0NXXr9DRzYcUFXa.DntjuW' );
INSERT INTO PRODUTO(nome,preço,quantidade) VALUES('Arroz',5.5,10); INSERT INTO PRODUTO(nome,preço,quantidade) VALUES('Tomate',4,10); INSERT INTO Cliente(nome,telefone,cpf) VALUES('Joao','88992345334','045.123.432-53'); INSERT INTO Cliente(nome,telefone,cpf) VALUES('Paulo','88995577442','123.234.345-67'); INSERT INTO ...
CREATE TABLE IF NOT EXISTS parent_priviledge( ID serial primary key, parent_component_ID INT NOT NULL, public INT NOT NULL DEFAULT 0, Web_Device INT NOT NULL DEFAULT 1, Mobile_Device INT NOT NULL DEFAULT 1, Admin_Device INT NOT NULL DEFAULT 1, Isdesktop INT NOT NULL DEFAULT 1, Ismobile INT NOT NULL DEFA...
/*Selecting all of the article table where his ID is 10 and also selecting this article's author's details*/ Select * FROM articles, users WHERE article.id = 10 AND articles.id_user = users.id;
use tzsystem; insert into user_table(name,password)values('admin','admin'); insert into zhibie_table(name)values('兽医'); insert into zhibie_table(name)values('会计'); insert into zhibie_table(name)values('老版'); insert into yg_table(name,sex,birthday,zhibie,tele)values('张三','男','1985-1-1',1,'123'); insert int...
CREATE TABLE blog_entry ( id bigint(20) NOT NULL AUTO_INCREMENT, version bigint(20) NOT NULL, author varchar(255) NOT NULL, body longtext NOT NULL, date_created datetime NOT NULL, last_updated datetime NOT NULL, locked bit(1) NOT NULL, me...
CREATE DATABASE IF NOT EXISTS `IngresoEgresos` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci */; USE `IngresoEgresos`; -- MySQL dump 10.13 Distrib 5.6.17, for debian-linux-gnu (i686) -- -- Host: localhost Database: IngresoEgresos -- ------------------------------------------------------ -- Server ver...
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- ホスト: localhost:3306 -- 生成日時: -- サーバのバージョン: 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 *...
CREATE DATABASE IF NOT EXISTS timesheet; USE timesheet; -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: mysql -- Generation Time: Oct 29, 2021 at 10:03 AM -- Server version: 8.0.27 -- PHP Version: 7.4.20 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:...
create or replace function random_words( p_word_list in apex_t_varchar2, p_count in integer default 3, -- max 10 limit enforced p_delimeter in varchar2 default '-' ) return varchar2 is s apex_t_varchar2; begin for i in 1 .. least(p_count, 10) loop apex_string.push(s, p_word_list(d...
create or replace TRIGGER SYSTEM.USER_LOGON_TRG AFTER logon ON DATABASE DECLARE p_module varchar2(64); p_user varchar2(64); p_host varchar2(64); p_osuser varchar2(64); -- 05/05/2014 - Fabricio Rucci ASM 10662 -- 07/05/2014 - Ivan Machado ASM 11330 -- 04/06/2014 - Fabricio (Adicionado JORGE SANFELI...
CREATE DATABASE customers;
CREATE TABLE IF NOT EXISTS "public"."items" ( "id" SERIAL NOT NULL, "category_id" int, "url" varchar(500), PRIMARY KEY ("id") );
-- Get an average rating and number of players for all games -- This query can be used to return the average rating of all games. This would be used by someone interesed in quickly sorting games by average rating. SELECT Game.GameID, Game.GameName, Count(playerID), Avg(Rating) FROM Game LEFT OUTER JOIN Review On Review...
-- Table definitions for the tournament project. -- -- Put your SQL 'create table' statements in this file; also 'create view' -- statements if you choose to use it. -- -- You can write comments in this file by starting them with two dashes, like -- these lines here. DROP DATABASE IF EXISTS tournament; CREATE DATABASE ...
use students; /*Список студентов*/ Select * from student; /*Список студентов по алфавиту*/ Select * from student order by sd_name; /*Список оценок по предмету «Java» (с фамилиями студентов)*/ select marks.subject, marks.mark, student.sd_name from marks inner join student on marks.student_id = student.student_id ...
delete from SystemRights where id = 790 / delete from SystemRightsLanguage where id = 790 / delete from SystemRightDetail where id = 4300 / insert into SystemRights (id,rightdesc,righttype) values (790,'请假类型颜色设置','3') / insert into SystemRightsLanguage (id,languageid,rightname,rightdesc) values (790,7,'请假类型颜色设置','请假类型...
delete from HtmlLabelIndex where id=23758 / delete from HtmlLabelInfo where indexid=23758 / INSERT INTO HtmlLabelIndex values(23758,'流程字段交换') / INSERT INTO HtmlLabelInfo VALUES(23758,'流程字段交换',7) / INSERT INTO HtmlLabelInfo VALUES(23758,'Change Fields',8) / INSERT INTO HtmlLabelInfo VALUES(23758,'流程字段交換',9) / dele...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 15-08-2019 a las 20:07:57 -- Versión del servidor: 5.6.17-log -- 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=@@C...
-- sample.menu definition -- Drop table -- DROP TABLE menu; CREATE TABLE menu ( id serial NOT NULL, title varchar NOT NULL, begin_date date NULL, CONSTRAINT menu_pk PRIMARY KEY (id), CONSTRAINT menu_un UNIQUE (title) );
system mysql -u root -proot CREATE USER 'ranger'@'localhost' IDENTIFIED BY 'ranger'; GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost'; GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'node2.example.com'; GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'%'; GRANT ALL PRIVILEGES ON *.* TO 'ranger'@'localhost' WITH GRANT OPTION; GRANT...
-- -------------------------------------------------------- -- 호스트: conative.myds.me -- 서버 버전: 5.7.31 - MySQL Community Server (GPL) -- 서버 OS: Linux -- HeidiSQL 버전: 11.0.0.5919 -- ----------------------------------------------------...
DROP PROCEDURE IF EXISTS `DBExternalIdGetExistsPlatform`; CREATE PROCEDURE `DBExternalIdGetExistsPlatform` () READS SQL DATA begin show tables like 'ExternalId'; end;
delete from HtmlLabelIndex where id=25348 / delete from HtmlLabelInfo where indexid=25348 / INSERT INTO HtmlLabelIndex values(25348,'未联系日期') / INSERT INTO HtmlLabelInfo VALUES(25348,'未联系日期',7) / INSERT INTO HtmlLabelInfo VALUES(25348,'No ContactDate',8) / INSERT INTO HtmlLabelInfo VALUES(25348,'未聯繫日期',9) /
select TMP.TZ_MSG_TEXT from ( select A.TZ_XXJH_ID, if(B.TZ_MSG_ID is null,A.TZ_MSG_ID,if(ltrim(rtrim(B.TZ_MSG_ID))='',A.TZ_MSG_ID,B.TZ_MSG_ID)) TZ_MSG_ID, if(B.TZ_MSG_ID is null,A.TZ_MSG_TEXT,if(ltrim(rtrim(B.TZ_MSG_ID))='',A.TZ_MSG_TEXT,B.TZ_MSG_TEXT)) TZ_MSG_TEXT from PS_TZ_PT_XXDY_TBL A...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- 主機: 127.0.0.1 -- 產生時間: 2019 年 03 月 20 日 02:49 -- 伺服器版本: 10.1.37-MariaDB -- PHP 版本: 7.1.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHAR...
-- phpMyAdmin SQL Dump -- version 4.6.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 17, 2017 at 02:28 PM -- Server version: 5.7.14 -- PHP Version: 5.6.25 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
DROP VIEW IF EXISTS joined; DROP VIEW IF EXISTS toyotas; DROP TABLE IF EXISTS "public"."make"; DROP TABLE IF EXISTS "public"."cars"; CREATE TABLE "public"."cars" ( id SERIAL PRIMARY KEY, type TEXT, model TEXT, cost INT, make_id INT ); INSERT INTO "public"."cars" ("type", "model", "cost", "make_id") VALUES ...
# EMS MySQL Manager 2.8.5.1 # --------------------------------------- # Host : localhost # Port : 3306 # Database : ultramarina SET FOREIGN_KEY_CHECKS=0; DROP DATABASE IF EXISTS `ultramarina`; CREATE DATABASE `ultramarina`; USE `ultramarina`; # # Structure for the `alimentos` table : # ...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th6 21, 2018 lúc 05:12 PM -- Phiên bản máy phục vụ: 10.1.31-MariaDB -- Phiên bản PHP: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
drop table if exists opensaga.saga_step;
INSERT INTO "ShopTest".public.artifacts_categories (id, category) VALUES (1, 'magic'); INSERT INTO "ShopTest".public.artifacts_categories (id, category) VALUES (2, 'basic');
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 14 Jan 2016 pada 09.11 -- Versi Server: 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 */; /*!...
DROP DATABASE IF EXISTS employeeDB; CREATE DATABASE employeeDB; USE employeeDB; CREATE TABLE department( id INT AUTO_INCREMENT NOT NULL, name VARCHAR(30) NOT NULL, PRIMARY KEY(id) ); CREATE TABLE role ( id INT AUTO_INCREMENT NOT NULL, title VARCHAR(30) NOT NULL, salary DECIMAL(10,2) NOT NULL, departme...
declare v_result number; v_TaskId Integer; begin v_TaskId := :TaskId; begin select col_casetask into v_result from tbl_task where col_id = v_TaskId; exception when NO_DATA_FOUND then v_result := 0; return v_result; end; return v_result; end;
DROP DATABASE IF EXISTS konnectd_db; CREATE DATABASE konnectd_db; USE konnectd_db; create table profiles( id integer(10) auto_increment not null, firstname varchar(50) not null, lasttname varchar(50) not null, email varchar(100) not null, phone_number INTEGER(15), positions varchar(30) not null, passwords VARCHAR...
use myhr; insert into education values(1, 'primary', 'primary (6 years) eduction'); insert into education values(2, 'secondary', 'secondary (12 years) eduction');
CREATE TABLE cms ( id CHAVE NOT NULL, id_cms_category CHAVE NOT NULL, position CHAVE NOT NULL, active BOOLEAN NOT NULL, indexation BOOLEAN NOT NULL, CONSTRAINT pk_cms PRIMARY KEY (id) );
USE burger_db; INSERT INTO burgers (burger_name) values ("Chicken Bacon Burger"); INSERT INTO burgers (burger_name) values ("All American Burger"); INSERT INTO burgers (burger_name) values ("Krabby Patty"); /* CREATE DATABASE `sequelizedburger_db` /*!40100 DEFAULT CHARACTER SET utf8 CREATE TABLE `burge...
CREATE OR REPLACE PROCEDURE zmien_liczbe_miejsc_4( arg_id_wycieczki wycieczki.id_wycieczki%TYPE, arg_liczba_miejsc INTEGER ) AS BEGIN sprawdz_czy_wycieczka_istnieje(arg_id_wycieczki); UPDATE wycieczki SET liczba_miejsc = arg_liczba_miejsc WHERE id_wycieczki = arg_id_wycieczki; END;
UPDATE employees SET salary = salary * 1.12 WHERE department_id IN (1,2,4,11); SELECT salary FROM employees;
drop extension multicorn cascade; CREATE EXTENSION multicorn; CREATE SERVER multicorn_srv_post FOREIGN DATA WRAPPER multicorn options ( wrapper 'pgCassandra.CassandraFDW', port '9042', columnfamily 'post', keyspace 'social_postsdata', hosts '10.233.41.11,10.233.41.12,10.233.41.13' ); CREATE FOREIGN TABL...
INSERT INTO `group_info` VALUES ('G1', '开发组', '2016-6-7 00:41:21', '2016-6-7 00:41:26'); INSERT INTO `menu_info` VALUES ('M001', '用户管理', '/usermgt', NULL, 1, '0', '1', NULL, NULL); INSERT INTO `menu_info` VALUES ('M0010', '角色管理', '/rolemgt', 'M001', 2, '0', '1', NULL, NULL); INSERT INTO `menu_info` VALUES ('M0011', '权...
INSERT INTO bibliotheque2.adherent (nomAdh,prenomAdh,rueAdh,villeAdh,cpAdh,mailAdh) VALUES ('Sanglier','Jules','5 rue du bois jolie','Olivet',45160,'jules.sanglier@protonmail.com');
with d as ( select sc.ProductId , sum(case when sc.SumType = 1002 then Sum * -1 else 0 end) as OverdueAmount , sum(case when sc.SumType = 1004 then Sum * -1 else 0 end) as OverdueRestructAmount , sum(case when sc.SumType = 2002 then Sum * -1 else 0 end) as OverduePercent , s...
-- tabelle löschen drop table programminformation; -- tabelle anlegen create table programminformation( nummer integer auto_increment, titel varchar(150), startzeit BIGINT, endzeit BIGINT, prod_verantwortlicher varchar(150), sende_verantwortlicher varchar(150), reale_startzeit BIGINT, reale_end...
create table "Games" ( id bigint not null, display_name varchar(60), genre_id bigint, package_id bigint, primary key(id), foreign key(genre_id) references "Genres" (id) match simple on update no action on delete no action, foreign key(package_id) references "P...
declare v_counter Integer; v_prevPos Integer; v_nextPos Integer; v_strFields nclob; v_valueStr nclob; v_value nvarchar2(255); v_value2 nvarchar2(255); begin v_counter := :counter; v_strFields := :strFields; v_valueStr := :valueStr; if (v_counter = 1) then v_prevPos := 0; else select instr(v_strFields, ',', 1, v_...
DROP DATABASE IF EXISTS socialmedia ; CREATE DATABASE socialmedia ; USE socialmedia ; CREATE TABLE user ( username VARCHAR(45) NOT NULL, email VARCHAR(45) NOT NULL, name VARCHAR(45) NOT NULL, password VARCHAR(45) NOT NULL, icon VARCHAR(10) NOT NULL, PRIMARY KEY (username) ); CREATE TABLE po...
-- MySQL dump 10.13 Distrib 5.5.49, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: ponto_de_venda_development -- ------------------------------------------------------ -- Server version 5.5.49-0ubuntu0.14.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARAC...
ALTER TABLE waffle_flag_mkt_users CHANGE COLUMN user_id userprofile_id int(11) unsigned NOT NULL;
-- phpMyAdmin SQL Dump -- version 4.9.3 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:8889 -- Généré le : mar. 24 mars 2020 à 16:47 -- Version du serveur : 5.7.26 -- Version de PHP : 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données : `intranet_cesi` -- -- ----...
drop table if exists ACT_HI_VARINST cascade; drop index if exists ACT_IDX_HI_PROCVAR_NAME_TYPE; drop index if exists ACT_IDX_HI_VAR_SCOPE_ID_TYPE; drop index if exists ACT_IDX_HI_VAR_SUB_ID_TYPE;
 CREATE PROCEDURE [Model].[ListModelAttributes] (@TableName VARCHAR(64)) AS SELECT DISTINCT O.name AS [Object Name] ,C.name AS 'ColumnName' ,ep.name ,ep.value AS [Extended property Code] ,CASE ep.value WHEN '1' THEN '' WHEN 'BK' THEN 'Business Key' WHEN 'CV' THEN 'Current Value' WHEN 'HD' THEN 'His...
delete from test.sbtest1 limit 300; select * from test.sbtest1 limit 300; explain analyze select * from test.sbtest1 s1,test.sbtest2 s2,test.sbtest3 s3,test.sbtest1 s4 where s1.id=s2.id and s1.id=s3.id and s2.id=s3.id and s1.id=s4.id and s1.k='5014614';
CREATE PROCEDURE usp_UpdateCollegeDetails -- Add the parameters for the stored procedure here @clg_id int, @clg_name varchar(50), @clg_address varchar(50), @clg_phone_number integer AS BEGIN -- update statements for procedure here UPDATE tbl_College SET clg_name...
Select * from Table_name; select column_name, ..., ... (x*30), ... from Table_name; select 'my name '||first_name||' ... '||last_name from Table_name; select DISTINCT col from Table_name; select DISTINCT col1, col2, col3, ... from Table_name; Create Table TName( col_name type number, col_name type varchar2(10),...
USE G3P1_contador_personas; -- Procedi mientos almacenados -- INSERTS DROP PROCEDURE IF EXISTS ingresar_ciudad; DELIMITER // CREATE PROCEDURE ingresar_ciudad(IN nombre varchar(45), IN sector varchar(45), IN poblacion INT) BEGIN INSERT INTO Ciudad (Nombre, Sectores, Poblacion) VALUES (nombre, sector, poblacion); END...