text
stringlengths
6
9.38M
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table node ( name varchar(255) not null, is_company tinyint(1) default 0 not null, identification_code varchar(255), bank_accou...
DROP TABLE IF EXISTS `tblCustomFields`; CREATE TABLE `tblCustomFields` ( `intCustomFieldsID` int(11) NOT NULL AUTO_INCREMENT, `intAssocID` int(11) NOT NULL DEFAULT '0', `strDBFName` varchar(30) NOT NULL DEFAULT '', `strName` varchar(100) NOT NULL DEFAULT '', `intLocked` smallint(6) NOT NULL DEFAULT '0', `tT...
// Mouvements à afficher autour de '2016-04-03 10:00' select movement_direction, SCHEDULED_TIME_OF_DEPARTURE as SCHEDULED, ACTUAL_TIME_OF_DEPARTURE as ACTUAL from movement_eblg where movement_direction = 'D' and least(SCHEDULED_TIME_OF_DEPARTURE, ESTIM_TIME_OF_DEPARTURE, ACTUAL_TIME_OF_DEPARTURE) < date_add('2016...
/* Warnings: - You are about to drop the column `skillId` on the `projects` table. All the data in the column will be lost. - You are about to drop the column `projectId` on the `skills` table. All the data in the column will be lost. */ -- DropForeignKey ALTER TABLE "projects" DROP CONSTRAINT "projects_skillId...
``` SELECT f.film_id,f.title FROM film f LEFT JOIN film_category fc ON f.film_id=fc.film_id WHERE fc.category_id IS NULL ```
SELECT TOP 1000 ur.*, u2.Email AS Reporter_Email, u.Email AS Post_Author, u.IsApproved AS User_Approved, p.IsApproved AS Post_Approved, p.PostAuthor, p.ThreadID FROM GI_CommunityServer.etl.UserReportedSpamPost ur (NOLOCK) JOIN GI_CommunityServer.dbo.cs_Posts p (NOLOCK) ON ur.PostId = p.PostID JOIN GI_CommunityServ...
--liquibase formatted sql --changeset id:123 author:JoshuaMiller --comment: BigCorp encapsulates important BigCorp concepts CREATE SCHEMA BigCorp --rollback DROP SCHEMA BigCorp;
CREATE TABLE [ERP].[SaldoInicialCuentaCobrar] ( [ID] INT IDENTITY (1, 1) NOT NULL, [IdSaldoInicialCobrar] INT NULL, [IdCuentaCobrar] INT NULL, PRIMARY KEY CLUSTERED ([ID] ASC), FOREIGN KEY ([IdCuentaCobrar]) REFERENCES [ERP].[CuentaCobrar] ([ID]), FOREIGN KEY ([IdSaldoIn...
SELECT TOP (5) e.EmployeeID, e.FirstName, p.Name AS [ProjectName] FROM Employees AS e LEFT JOIN EmployeesProjects AS ep ON e.EmployeeID = ep.EmployeeID LEFT JOIN Projects AS p ON ep.ProjectID = p.ProjectID WHERE p.StartDate > '2002-08-13' AND p.EndDate IS NULL ORDER BY e.EmployeeID
#-------------------------------------------------- #sys_products DROP TABLE IF EXISTS sys_products; CREATE TABLE sys_products ( id int not null auto_increment, vendor_id INT, vendor_product_id NVARCHAR(10), product_name NVARCHAR(100), product_desc NVARCHAR(500), product_type_id INT, product_status_id ...
select s.owner, s.table_name, t.num_rows, s.column_name, s.histogram from dba_tab_col_statistics s left join dba_tables t on s.table_name = t.table_name --where lower(table_name) in ('hdrlcb','itelcb') --and lower(column_name) in ('codemp','codufu','datref','orictz','stalcb','seqhdrlcb','codplacct','numcrz') wher...
SELECT distinct A.SEQ_NO, --A.履历号 B.SCORING_CARD_CODE --B.打分卡代码 FROM CARDRANK_HISTORY A --打分卡及评价级别维护履历(A) INNER JOIN SCORING_CARD_MST B --打分卡(B) ON --A.履历号 = B.履历号 A.SEQ_NO = B.SEQ_NO WHERE --A.激活标志 = 已激活 A.ACTIVATE_FLAG = 1 --A.评级类型 = 参数:评级类型 AND A.RATING_TYPE = /*ratingType*/
Insert into Team values ('Boston Uprising', 'Boston', 1); Insert into Team values ('Dallas Fuel', 'Dallas', 2); Insert into Team values ('Florida Mayhem', 'Florida', 3); Insert into Team values ('Houston Outlaws', 'Houston', 4); Insert into Team values ('London Spitfire', 'Londres', 5); Insert into Team values ('Los A...
CREATE DATABASE IF NOT EXISTS murmur; CREATE USER 'graphene'@'%' IDENTIFIED BY 'graphene'; GRANT ALL ON *.* TO 'graphene'@'%'; FLUSH PRIVILEGES;
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 17, 2016 at 04:07 AM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
/* Navicat Premium Data Transfer Source Server : local Source Server Type : MySQL Source Server Version : 50731 Source Host : localhost:3306 Source Schema : dbbook Target Server Type : MySQL Target Server Version : 50731 File Encoding : 65001 Date: 18/01/2021 14:15:5...
---Module 6-1 SELECT * FROM SalesLT.Product WHERE ListPrice=(SELECT MAX(ListPrice) FROM SalesLT.Product) --correlated subquery SELECT soh1.CustomerID, sod1.ProductID, sod1.LineTotal FROM SalesLT.SalesOrderHeader AS soh1 JOIN SalesLT.SalesOrderDetail AS sod1 ON soh1.SalesOrderId=sod1.SalesOrderID WHERE sod1.Line...
## Part 1: Test it with SQL Describe job; ## Part 2: Test it with SQL SELECT name FROM employer WHERE location="St. Louis City"; ## Part 3: Test it with SQL DROP table job; ## Part 4: Test it with SQL SELECT s.name, s.description FROM skill s INNER JOIN job_skills js ON s.id=js.skills_id ORDER BY s.name;
/*$tempViewSQL*/ SELECT TOP(CONVERT(INT, /*topRow*/)) -- 顧客ID SUB_A.CUSTOMER_ID, -- 顧客_名称 SUB_A.CUSTOMER_NAME, -- 案件番号 SUB_A.CASE_NO, -- 案件名称 SUB_A.CASES_NAME, -- 契約番号 SUB_A.CONTRACT_NO, --【LAMP_STEP2 向け仕様追加・変更対応】 zhanglw add 2013/04/25 start -- ノンリコース SUB_A.NON_RECOURSE_FLG, --【LAMP...
ALTER TABLE `inf_player` DROP INDEX `user_name_unique`; CREATE UNIQUE INDEX `user_name_unique` USING BTREE ON `inf_player` (`user_name`,`carrier_id`);
CREATE TABLE dbo.office_kegs ( office_id VARCHAR(40) NOT NULL, keg_id INTEGER NOT NULL, CONSTRAINT pk_office_kegs PRIMARY KEY (office_id, keg_id), CONSTRAINT fk_office_kegs_office FOREIGN KEY (office_id) REFERENCES dbo.offices (office_id), CONSTRAINT fk_office_kegs_keg FOREIGN KEY (keg_id) REFEREN...
 INSERT INTO public."Operation"("OperationName", "OperationDescription") VALUES ('Send','Send'); INSERT INTO public."Operation"("OperationName", "OperationDescription") VALUES ('MarkAsRead','MarkAsRead'); INSERT INTO public."Operation"("OperationName", "OperationDescription") VALUES ('MarkAsUnread',...
CREATE TABLE `employee_table` ( `employee_id` int(11) NOT NULL, `employee_name` varchar(255) DEFAULT NULL, `sal` double DEFAULT NULL, PRIMARY KEY (`employee_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: revisionary-do-user-2911443-0.db.ondigitalocean.com:25060 -- Generation Time: Feb 16, 2020 at 07:43 PM -- Server version: 8.0.17 -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET ti...
DROP USER COMMON CASCADE;
DELETE FROM barcie_schedule_map; DELETE FROM barcie_availability; DELETE FROM barcie_days; DELETE FROM DWF_punten; DELETE FROM DWF_wedstrijden; DELETE FROM TeamPortal_aanwezigheden; DELETE FROM TeamPortal_email; DELETE FROM TeamPortal_fluitbeschikbaarheid; DELETE FROM TeamPor...
create table teams ( id serial not null constraint teams_pkey primary key, name varchar(255) not null, description varchar(255) not null, group_id integer ) ; create table groups ( id serial not null constraint groups_pkey primary key, group_stage_id integer ) ; alter table teams add constraint teams...
SELECT count(*) from public.candidato; select faixa, count(q006) as total from candidato left join rendafamiliar on id=q006 group by faixa, q006 order by total desc;
ALTER TABLE TenderQuotations ADD BulkDiscount float,CouponCode nvarchar(50), FinalPrice float
# 4@(#) tLogMinerAddFile.sql 4.1@(#) 07/09/07 12:27:05 PROMPT This script adds a file to a logminer session. PROMPT Enter the file name of the file you want to add to analysis list. PROMPT ACCEPT p_log_file Prompt 'Please enter the path of the archivelog file you want to add to this run: ' set serveroutput on EXECUTE ...
set names utf8; drop table if exists t_resume_info; create TABLE t_resume_info( `id` bigint(16) NOT NULL AUTO_INCREMENT , `name` varchar(255) NULL DEFAULT NULL COMMENT '名字' , `age` varchar(255) NULL DEFAULT NULL COMMENT '年龄' , `birth_date` varchar(255) NULL DEFAULT NULL COMMENT '生日' , `gender` enum('f','m') N...
CREATE OR REPLACE FUNCTION cosine_sim(float4[], float4[]) RETURNS float4 AS 'MODULE_PATHNAME','cosine_sim' LANGUAGE C STRICT;
create temporary table study_temp as select study_pk_id from study where patient_pk_id=1330282561; create temporary table series_temp as select general_series_pk_id from general_series where study_pk_id in (select * from study_temp); create temporary table image_temp as select image_pk_id from general_image wh...
--Usuniecie Funkcji DROP FUNCTION FUN_AVG_WIEKU_ZAW_KLUBU; DROP FUNCTION FUN_MECZ_ILOSC_KARTEK; DROP FUNCTION FUN_WYNIK_MECZU; DROP FUNCTION FUN_PROC_ZDARZENIE_MECZ; --Opróżnienie kosza PURGE RECYCLEBIN;
WITH T AS ( SELECT CASE WHEN BS_Lesson.dtDate >= TO_DATE('2018-06-01','YYYY-MM-DD') AND BS_Lesson.dtDate <= TO_DATE('2018-08-31','YYYY-MM-DD') THEN 'FY19' WHEN BS_Lesson.dtDate >= TO_DATE('2017-06-01','YYYY-MM-DD') AND BS_Lesson.dtDate <= TO_DATE('2017-08-31','YYYY-MM-DD') THEN 'FY18' WHEN BS_Lesson.dtD...
CREATE TABLE json_samples ( id bigserial PRIMARY KEY, text_json json, binary_json jsonb, notes text ) INSERT INTO json_samples (text_json, notes) VALUES ( '{ "minStartTimeNs": "1429828653617000000", "maxEndTimeNs": "1429839639367000000", "dataSourceId": "derived:com.google.heart_rate.bpm:com.goog...
create table app.user_( id integer not null generated always as identity, name varchar(30) not null, password varchar(50) not null, last_login_time timestamp not null, manager_id integer, group_id integer, primary key (id) ); create table app.user_info_( id integer not null generated al...
------------------------------------------------------------------------------ -- LOG Directory objects -- -- NOTE: -- %..% variables are substituted with the correct values during installation. -- Refer to the install script for details on these installation variables. -- Directory objects belong to SYS, regardl...
USE BloodPressure; SELECT 'CreateBPTables.sql' AS ''; SOURCE C:/MySQLScripts/CreateBPTables.sql; SELECT 'CreateNutritionTables.sql' AS ''; SOURCE C:/MySQLScripts/CreateNutritionTables.sql; SELECT 'CreateNutritionViewsPRIMARY.sql' AS ''; SOURCE C:/MySQLScripts/CreateNutritionViews.sql; USE Expenditure; SELECT '...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table carts ( id bigint auto_increment not null, ip varchar(255), constraint pk_carts primary key (id)) ; create table categories ( id...
INSERT INTO `Peaton` (`DNI`) VALUES (12031830); INSERT INTO `Peaton` (`DNI`) VALUES (42111840);
use pubs -- Select All Data create proc ShowData as select * from titles ShowData -- Delete Item by ID create proc DeleteTitleById @ID varchar(6) as Delete from titles where title_id = @ID DeleteTitleById 'AS1111' -- Update Item by ID create proc UpdateTitleById @ID varchar(6),@TITILE varchar(80),@TYPE varchar(...
prompt prompt ============================== prompt == GLOBAL_STATS prompt ============================== prompt set timing on echo on exec dbms_stats.gather_table_stats( ownname => 'JKSTILL', tabname => 'STATSTEST', granularity=>'GLOBAL', force=>true) set echo off
use testdb; CREATE TABLE `product_table` ( `vId` int NOT NULL AUTO_INCREMENT, `productName` varchar(45) NOT NULL, `type` varchar(45) NOT NULL, `description` varchar(45) NOT NULL, `availability` varchar(45) NOT NULL, `color` varchar(45) NOT NULL, `quantity` int NOT NULL, `price` int NOT NULL, PRIMARY ...
select * from [smsdss].[c_hac_1_fy17_v]; select * from [smsdss].[c_hac_2_fy17_v]; select * from [smsdss].[c_hac_3_fy17_v]; select * from [smsdss].[c_hac_4_fy17_v]; select * from [smsdss].[c_hac_5_fy17_v]; select * from [smsdss].[c_hac_6_fy17_v]; select * from [smsdss].[c_hac_7_fy17_v]; select * from [smsdss].[c_...
WITH users AS ( SELECT user_id, activated_at, state, language FROM tutorial.playbook_users ), events AS ( SELECT user_id, event_name, occurred_at, device, location FROM tutorial.playbook_events ) SELECT x.cohort AS "Date", MAX(x.period_age) OVER (PARTIT...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 21, 2020 at 08:34 AM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
DELETE FROM user_roles ur WHERE user_id<0; DELETE FROM users WHERE id<0; INSERT INTO users (ID, password, username) VALUES (-1,'yes-yes,you can see this password :)','TestBill'), (-2,'yes-yes,you can see this password :)','TestMaria'), (-3,'yes-yes,you can see this password :)','TestAnna Franziska Srna')...
SELECT CASE WHEN shipping_cost ISNULL THEN 0 ELSE shipping_cost END as "shipping_cost", CASE WHEN discount ISNULL THEN 0 ELSE discount END as "discount", CASE WHEN payment_cycle = '' THEN 'NONE' ELSE payment_cycle END as "payment_cycle", order_id, status, account_id, price, quantity...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Хост: 127.0.0.1 -- Время создания: Фев 23 2020 г., 17:43 -- Версия сервера: 10.4.11-MariaDB -- Версия PHP: 7.4.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
-- noinspection SqlNoDataSourceInspectionForFile # --- !Ups -- see http://listofrandomnames.com/ insert into applicant (app_id,name, dob, phone,email) values ( 1,'Nick McMahon','1980-11-22', '01234-123-234','nMcMahon@gmail.com'); insert into applicant (app_id,name, dob, phone,email) values ( 2,'Marvel Tank','1981...
CREATE TABLE IF NOT EXISTS files ( id varchar primary key, file_name varchar not null, doc_class varchar not null, doc_type varchar not null, doc_num varchar not null, metadata jsonb not null );
SELECT '{{start_time}}' AS start, '{{end_time}}' AS end_time
SELECT primeiro_nome, endereco FROM TB_FUNCIONARIO F INNER JOIN TB_DEPARTAMENTO D ON F.NUMERO_DEPARTAMENTO = D.NUMERO_DEPARTAMENTO WHERE D.NOME_DEPARTAMENTO = 'Pesquisa'
select country.continent, round(avg(city.population)-0.5,0) from city join country on city.countrycode=country.code where city.id is Not null group by country.continent;
CREATE PROCEDURE ERP.Usp_Sel_Proyecto_RptComprasDetalle @IdProyecto INT, @FechaDesde DATETIME, @FechaHasta DATETIME AS SELECT C.IdTipoComprobante, C.Serie, C.Numero, C.TipoCambio, C.FechaEmision, CASE WHEN P.IdMoneda = 1 AND C.IdMoneda = 1 THEN CD.Importe WHEN P.IdMoneda = 2 AND C.IdMoneda = 2 THEN CD.Imp...
DROP TABLE IF EXISTS `XXX_plugin_2_klick_video_cache_images`; ##b_dump## DROP TABLE IF EXISTS `XXX_plugin_2_klick_video_cache`; ##b_dump## DROP TABLE IF EXISTS `XXX_plugin_2_klick_video_lang`; ##b_dump## DROP TABLE IF EXISTS `XXX_plugin_2_klick_video`; ##b_dump##
drop table tournament drop table team drop table Player drop table point create table tournament ( Keys varchar(10) not null, Type varchar(20), Name varchar(50), ) create table team ( Keys varchar(10) not null, TName varchar(20) not null, ) create table Player ( Keys varchar(10), TName varchar(20), PName var...
--creates in data base the max level of privilege --We consider the level of maximum privilege the administrator, diogo and catarina --Administrators are also clients, manager, content manager --insert db usr insert into usr(username, email, password, firstName, lastName) values('DiogoViana', 'diogo.g.viana@gmail.com'...
--1. How many unique nodes are there on the Data Bank system? SELECT COUNT(DISTINCT node_id) FROM data_bank.customer_nodes; --2. What is the number of nodes per region? SELECT region_name,COUNT(node_id) FROM data_bank.customer_nodes JOIN data_bank.regions USING (region_id) GROUP BY region_name --3. How many custome...
/* Formatted on 21/07/2014 18:30:25 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.QZV_ST_MIS_BD_TOP_30_NT ( COD_SRC, ID_DPER, DTA_COMPETENZA, COD_STATO_RISCHIO, DES_STATO_RISCHIO, COD_ABI, COD_SNDG, COD_CLI_GE, COD_GRUPPO_ECONOMICO, VAL_VANT, VAL_GBV, VAL_NBV, ...
use databaseappdev; DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS cars; CREATE TABLE user ( uID varchar(25) NOT NULL, password varchar(25) NOT NULL, fName varchar(50) NOT NULL, lName varchar(50) NOT NULL, email varchar(50) NOT NULL, city varchar(50), state varchar(50), gender char(1) NOT NULL, PRIMARY KEY ...
select * from award where award_number = '002927-00001'; select * from award_amount_transaction where award_number = '002927-00001'; select * from award_amount_info where award_number = '002927-00001'; select * from award_amount_info where award_number in ('002925-00001','002927-00001');
insert into bonuses (id, name, valid_from, valid_to, type, netent_bonus_code, created_by, created_date, promotion_id, amount, maximum_amount, quantity, percentage, currency, required_level) values (127, 'Customer Support Adjustable Bonus', timestamp('2013-12-31 23:59:59'), timestamp('2029-12-31 2...
DROP TABLE IF EXISTS words CASCADE; DROP SEQUENCE IF EXISTS words_id; CREATE TABLE words ( id SERIAL primary key, word text NOT NULL, lang integer NOT NULL references languages(id) ); CREATE SEQUENCE words_id;
CREATE TABLE customer( customer_id SERIAL PRIMARY KEY, first_name VARCHAR(50), last_name VARCHAR(50), ticket_id INTEGER NOT NULL concession_item VARCHAR(100) ); CREATE TABLE ticket( ticket_id SERIAL PRIMARY KEY, movie_name VARCHAR(200), date DATE DEFAULT CURRENT_DATE, movie_id INTEGER NOT NULL, customer_id I...
UPDATE weight SET progress = $2, last_log = $3 WHERE goalid = $1;
DROP DATABASE IF EXISTS university; DROP USER IF EXISTS test; CREATE DATABASE university; CREATE user 'test'@'%' IDENTIFIED BY 'x@f7uh6H5Rx23fx'; GRANT ALL PRIVILEGES ON university.* TO 'test'@'%'; FLUSH PRIVILEGES;
SELECT * from {{ @joining_defs1 }}
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Oct 24, 2021 at 03:36 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
----------------------------------------------- ------- Blood Donation Database Project ------- ----------- Author: Aleksei Volkov ------------ ---------------- Group: Б05-932 --------------- ----------------- Spring 2021 ----------------- ---------------- Various views ---------------- --------------------------------...
alter table `contents` drop column `as_page`; drop table if exists `recommend_contents`;
SELECT LoteID, Campaña, SUM(KilosProducidos), SUM(Merma), SUM(TotalExportacion), SUM(TotalVenta), SUM(TotalEfectivo), SUM(TotalDeposito) FROM (SELECT "VENTA EXPORTACION" AS Venta, A.LoteID, A.Campaña, A.KilosProducidos, A.Merma, ...
/* Warnings: - The migration will add a unique constraint covering the columns `[name,category]` on the table `skills`. If there are existing duplicate values, the migration will fail. */ -- CreateTable CREATE TABLE "images" ( "id" SERIAL NOT NULL, "imageUrl" TEXT NOT NULL, "projectId" INTEGER, P...
SELECT trunc(number1 + number2) AS towardzero FROM decimals;
create database prueba testuse prueba /*nombre, apellido, edad, email, password, sexo, fehadenacimiento*/ create table registro ( idusuario int (11) not null AUTO_INCREMENT primary key, nombre varchar(30) not null, apellido varchar(30) not null, edad int, email varchar(50) not null, pass varchar(30) not null, sex...
Use things; /* Из всех проектов для одного пользователя. Объедините проекты с задачами, чтобы посчитать количество задач в каждом проекте и в дальнейшем выводить эту цифру рядом с именем проекта. */ SELECT count(t.name) AS count, p.name,u.username FROM projects p JOIN tasks t ON t.project_id = p.id JOIN users u ...
-- MySQL Script generated by MySQL Workbench -- Mon Oct 14 14:38:01 2019 -- 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='ON...
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Dec 11, 2015 at 12:24 PM -- Server version: 5.5.41-0ubuntu0.14.04.1 -- PHP Version: 5.5.9-1ubuntu4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
with temp AS (SELECT team_id, COUNT(employee_id) AS team_size FROM Employee GROUP BY team_id) SELECT employee_id, team_size FROM Employee e INNER JOIN temp ON e.team_id = temp.team_id
/* Project Option: Coyote Residence Office TEAM: King James & The Knights of the Data Table CREATED BY: Mark Takahashi */ CREATE TABLE Room ( Room_Number VARCHAR2(4) /*PA*/ CONSTRAINT Room_Room_Number_UK UNIQUE, Rent NUMBER(6,2) CONSTRAINT Room_Rent_NN NOT NULL, Residence_Number CHAR(4), /*PA,FK*/ CONSTRAINT Room_PK...
-- ----------------------------------------------------------------------------- -- -- File: $RCSfile: ccdb.sql,v $ -- Revision: $Revision: 1.3 $ -- Description: Clearcase DB -- Author: Andrew@ClearSCM.com -- Created: Wed Mar 14 15:53:12 PDT 2011 -- Modified: $Date: 2011/04/15 22:19:21 $ -- Langua...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 19, 2020 at 05:16 PM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
/*注册信息表*/ CREATE TABLE xhb_register( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,#注册表id sid VARCHAR(50) NOT NULL UNIQUE, #sid account VARCHAR(50) NOT NULL UNIQUE , #注册账号 pwd_md5 VARCHAR(50) NOT NULL , #注册密码密文 reg_date DATETIME NOT NULL DEFAULT current_timestamp, #注册日期 reg_ip VARCHAR(2...
# set the opposite of value on boolean UPDATE table SET my_bool = NOT my_bool
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1:3306 -- Généré le : lun. 01 fév. 2021 à 16:24 -- 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"; /*!40101 SET @OLD_CHARACTER_SET_C...
INSERT INTO [MSettings]([PkSettingNo],[SettingKeyCode],[SettingTypeNo],[SettingValue],[SettingDescription],[StatusNo]) VALUES(374,'S_IsMobileShop',1,'False',NULL,2); INSERT INTO [MSettings]([PkSettingNo],[SettingKeyCode],[SettingTypeNo],[SettingValue],[SettingDescription],[StatusNo]) VALUES(375,'P_IsBrok...
use assignment4; show tables; select * from dept; select * from employee; select dept_name,empname from employee inner join dept on dept.dept_id = employee.dept_id; select * from employee inner join dept on employee.dept_id = dept.dept_id; select dept_id,sum(salary) from employee group by dept_id; select dept_na...
-- -- delete existing dele -- delete from track; delete from cd; delete from artist; -- now the data insert -- first the artist tables insert into artist(id,name) values(1,'Pink Floyd'); insert into artist(id,name) values(2,'Genesis'); insert into artist(id,name) values(3,'Einaudi'); insert into artist(id,name) val...
-- phpMyAdmin SQL Dump -- version 4.9.7 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Tempo de geração: 24-Ago-2021 às 19:08 -- Versão do servidor: 5.7.23-23 -- versão do PHP: 7.3.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @...
CREATE TABLE mitabla ( dni INTEGER null , correo VARCHAR(30) NULL ); CREATE TABLE miotratabla ( nombre VARCHAR(30) NULL, apellido VARCHAR(30) NULL, edad INTEGER NULL );
PROMPT SET ECHO ON SELECT * FROM DRUZYNA; SET ECHO OFF PROMPT
/*==============================================================*/ /* DBMS name: ORACLE Version 11g */ /* Created on: 12/21/2017 11:00:23 PM */ /*==============================================================*/ alter table ALARM drop constraint FK_ALA...
SELECT COUNT(first_name) FROM employees; SELECT COUNT(DISTINCT first_name) FROM employees;
CREATE TABLE [app].[Homologaciones] ( [Id] VARCHAR (20) NOT NULL, [Nombre] VARCHAR (50) NOT NULL, [Descripcion] VARCHAR (200) NOT NULL, [Id_Aplicacion_Origen] VARCHAR (20) NOT NULL, [Id_Aplicacion_Destino] VARCHAR (20) NOT NULL, [Ordinal] ...
DROP DATABASE IF EXISTS `micro_posts`; CREATE DATABASE `micro_posts` DEFAULT CHARSET utf8 COLLATE utf8_bin; GRANT ALL PRIVILEGES ON `micro_posts`.* TO root@localhost IDENTIFIED BY '';
INSERT INTO t_Label VALUES (1, "HIT"); INSERT INTO t_Label VALUES (2, "SEMI-HIT"); INSERT INTO t_Reviewer VALUES (1, "SHANTONU"); INSERT INTO t_Reviewer VALUES (2, "SAUMEN"); INSERT INTO t_Artist VALUES (1, "LATA"); INSERT INTO t_Artist VALUES (2, "ASA"); INSERT INTO t_Genre VALUES (1, "POP"); INSERT INTO t_Genre V...
DELETE FROM info.unit_patron_discounts WHERE unit_patron_uid IN (SELECT unit_x_patrons.id FROM info.unit_x_patrons JOIN setup.units ON unit_x_p...
select * from emp
/* * buildSearchParts * Inverted Index Toolkit <http://code.google.com/p/inverted-index/> * Apache License 2.0, blah blah blah. * * This constructs the various clauses for the search query, returning * them in the INOUT parameters. * * It is not intended to be used directly, but by the "search" procedure. * ...