text
stringlengths
6
9.38M
create database terminal_db; \c terminal_db; create table role( id serial primary key, name_of_role varchar(100) ); create table rules( id serial primary key, edit_items boolean, delete_items boolean, create_items boolean ); create table role_rules( id serial primary key, role_id int ref...
--#### --#maight be really dangerous is using drop table --#### --drop table if exists candidate; create table referendum ( id integer primary key autoincrement, description_en text not null, description_ir text ); --#drop table if exists party; create table referendum_vote( referendum_id integer primary key re...
UPDATE posts SET notified = null WHERE id = $1; SELECT name, id FROM Posts WHERE notified = 'approved' AND seller_id = $2;
create database meme_test; create schema auth; CREATE TABLE auth.token ( id serial primary key, user_id int not null, token varchar(64) not null, issued_date timestamp NOT NULL DEFAULT now() ); create table auth.credentials ( user_id serial primary key, login ...
select * from roberto_salcido899.solutionsdemoengagedusers
create table authenticated_user ( user_id BINARY(16) not null, created datetime not null, email varchar(200), oauth_key varchar(255) not null, user_name varchar(50), primary key (user_id) ) engine = InnoDB; create table content ( content_id bigint not null, action v...
select 1+1 as result
INSERT INTO Staff VALUES('MR01','Merle Rothwell',8975806691,'shinystar61',659628825235,FALSE); INSERT INTO Staff VALUES('NH02','Nanette Hoover',8814929959,'slowS@lmon99',531459017385,TRUE); INSERT INTO Staff VALUES('UT03','Ula Tarkington',8913711779,'mi$tyBerry35',248370154512,FALSE); INSERT INTO Staff VALUES('RT04','R...
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "-02:00"; -- Horario do Brasil, Fuso de SAO PAULO -- -- Arquivo SQL compativel com versoes do MySql superiores a v5.5 do mesmo. -- Este DB usa a codificacao utf8mb4 e tem a funcao CURRENT_TIMESTAMP ativa. -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET...
select * from user_spending where budget_id = $1;
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Jan 06, 2020 at 09:46 AM -- Server version: 5.7.28-0ubuntu0.19.04.2 -- PHP Version: 7.2.24-0ubuntu0.19.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
SELECT TOP 1 (AVG_WHOLE_SALE ) --redbook車両マスタ FROM RED_BOOK_VEHICLE_MST --メーカー説明=Session契約物件情報.車のメーカ WHERE MAKE_DESCRIPTION = /*makeDescription*/'Isuzu' --AND ブランド説明=Session契約物件情報.車のブランド AND FAMILY_DESCRIPTION = /*familyDescription*/'D-Max' --AND 製造年=Session契約物件情報.製造年 AND YEAR_GROUP = /*yearGroup*/'2013' --AND 説明=S...
create table PARKING_LOT ( ID varchar(100) primary key, NAME varchar(100) unique, CAPACITY int , LOCATION varchar(100) ); ALTER TABLE PARKING_LOT ADD CONSTRAINT CK_CAPACITY CHECK(CAPACITY > 0);
-- -- Script was generated by Devart dbForge Studio 2019 for MySQL, Version 8.2.23.0 -- Product Home Page: http://www.devart.com/dbforge/mysql/studio -- Script date 5/5/2021 4:23:36 PM -- Server version: 10.1.47 -- Run this script against MF775_VVAn_Test to synchronize it with MF775_VVAn_AMIS -- -- -- Disable foreig...
-- -- PostgreSQL database dump -- SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; -- -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -- CREATE EXTENSION IF NOT EXISTS plpgs...
/* SQLyog Community v12.06 (32 bit) MySQL - 6.0.0-alpha-community-nt-debug : Database - timetable ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 ...
CREATE TABLE [Identity].[UserTokens] ( [UserId] UNIQUEIDENTIFIER NOT NULL, [LoginProvider] NVARCHAR (128) NOT NULL, [Name] NVARCHAR (128) NOT NULL, [Value] NVARCHAR (MAX) NULL, CONSTRAINT [PK_AspNetUserTokens] PRIMARY KEY CLUSTERED ([UserId] ASC, [LoginProvider] ASC, [...
USE codeup_test_db; DROP TABLE IF EXISTS albums; CREATE TABLE albums ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, artist VARCHAR(20) , name VARCHAR(30), release_date INT UNSIGNED, sales FLOAT, genre VARCHAR(15), PRIMARY KEY (id) );
SELECT p.FirstName + ' ' + p.LastName AS [Full Name], f.Origin, f.Destination FROM Tickets AS t JOIN Passengers AS p ON p.Id = t.PassengerId JOIN Flights AS f ON f.Id = t.FlightId ORDER BY [Full Name], f.Origin, f.Destination
spool "C:\Users\Tyga\personal_ventures\dental_inserts.sql"; alter table product disable constraint product_size_null; alter table vendor disable constraint vendor_employee_null; alter table po_items disable constraint po_items_payable_null; alter table po disable constraint po_ap_status_null; --insert into zip insert ...
-- phpMyAdmin SQL Dump -- version 3.4.10.1deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jul 18, 2014 at 12:38 PM -- Server version: 5.5.37 -- PHP Version: 5.5.15RC1 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
CREATE FUNCTION getNthHighestSalary(N INT) RETURNS INT BEGIN RETURN ( # Write your MySQL query statement below. SELECT Salary FROM Employee E1 WHERE ( (SELECT COUNT(DISTINCT(Salary)) FROM Employee E2 WHERE E2.Salary > E1.Salary) = N - 1) LIMIT 1 ); END
INSERT INTO "Body" ("BodyId", "Name", "Description", "TdrCode") VALUES (uuid_generate_v4(), 'Supreme Court', 'Supreme Court', 'TDR-SC');
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2.1 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: Oct 26, 2018 at 09:46 AM -- Server version: 5.7.23-0ubuntu0.16.04.1 -- PHP Version: 7.1.22-1+ubuntu16.04.1+deb.sury.org+1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; ...
/* Navicat MySQL Data Transfer Source Server : study_personal Source Server Version : 80013 Source Host : localhost:3306 Source Database : study Target Server Type : MYSQL Target Server Version : 80013 File Encoding : 65001 Date: 2020-11-07 16:21:39 */ SET FOREIGN_KEY_CHECKS=0; -...
DELETE Issues WHERE RepositoryId IN (SELECT Id FROM Repositories WHERE Name = 'Softuni-Teamwork') DELETE RepositoriesContributors WHERE RepositoryId IN (SELECT Id FROM Repositories WHERE Name = 'Softuni-Teamwork')
/* the following queries populate a table that has counts for people who joined a particular chapter as an additional to their primary chapter. */ /* This must be run before the report query that follows it below */ /* The join to the civicrm_value_trial_2 table only returns results for people who joined additional ch...
CREATE TABLE [aud].[despachos_dicermex] ( [id_auditoria] INT NOT NULL, [mes] INT NOT NULL, [fecha_archivo] DATE NOT NULL, [id_orden] INT NOT NULL, [numero_orden] ...
select lname, salary from jmendoza.employee where salary > 25000 /
USE TestingSystem; -- Exercise 1: Join -- Question 1: Viết lệnh để lấy ra danh sách nhân viên và thông tin phòng ban của họ SELECT * FROM `Account` A INNER JOIN Department D ON A.DepartmentID = D.DepartmentID; -- Question 2: Viết lệnh để lấy ra thông tin các account được tạo sau ngày 20/12/2010 SELECT * FROM...
CREATE TABLE GEO.CITY ( ID_CITY SERIAL NOT NULL PRIMARY KEY , ID_ADM_AREA INTEGER NOT NULL REFERENCES GEO.ADM_AREA (ID_ADM_AREA) , NAME VARCHAR(70) NOT NULL NOT NULL , ZIPCODE VARCHAR(12) NOT NULL , ACTIVE DOM_BOOL ); CREATE INDEX IDX_ID_ADM_AREA_T_GEO_CITY ON GEO.CITY USING BTREE (ID_ADM_AREA); CR...
INSERT INTO skills VALUES (1, 'Java'); INSERT INTO skills VALUES (2, 'C++'); INSERT INTO skills VALUES (3, 'SQL'); INSERT INTO skills VALUES (4, 'Ruby'); INSERT INTO companies VALUES (1, 'GoIT', 'Ukraine'); INSERT INTO companies VALUES (2, 'Microsoft', 'USA'); INSERT INTO companies VALUES (3, 'Apple', 'USA'); ...
-- test ---------------------------------------- create table t ( x text, y int ); CREATE TABLE `t` ( `x` text, `y` int(11) DEFAULT NULL ) ENGINE=InnoDB; -- test ---------------------------------------- create table t ( a int null, b int null default null, c int not null, d int not nul...
-- phpMyAdmin SQL Dump -- version 3.5.3 -- http://www.phpmyadmin.net -- -- Servidor: localhost -- Tempo de Geração: -- Versão do Servidor: 5.5.28 -- Versão do PHP: 5.3.18 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @O...
/*select date(date_trunc('month',date_sale)), sales_date, to_date(to_char(d.period, '999999'), 'YYYYMM'), d.period from debt as d full outer join newsales as s on s.clie_id = d.user_id where to_date(to_char(d.period, '999999'), 'YYYYMM') >= date(date_trunc('month',date_sale)) --s.clie_id is null--d.user_id is null lim...
ALTER TABLE `denied_guids` MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT, MODIFY `created` datetime(6) NOT NULL, MODIFY `modified` datetime(6) NOT NULL;
SELECT * FROM users LIMIT 3; SELECT * FROM posts LIMIT 3; SELECT * FROM subreddits LIMIT 3; SELECT COUNT(*) FROM subreddits; SELECT MAX(score) as 'high_score from posts', user_id FROM posts; SELECT MAX(score) as 'high_score_users', username FROM users; SELECT subscriber_count, name FROM subreddits ORDER BY subscr...
create database SP use SP -- Creación de la tabla de MARCA create table marca( `Nombre_Marca` varchar (25) not null, primary key(`Nombre_Marca`)); -- Creación de la tabla Producto create table producto( `ID_Producto` VARCHAR(7) NOT NULL, `Nombre` VARCHAR(45) NOT NULL, `Localización` VARCHAR(10) NULL, `E...
-- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 06-10-2020 a las 07:46:11 -- Versión del servidor: 10.4.14-MariaDB -- Versión de PHP: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_...
insert into user_playlists (title, user_id, playlist_total_duration, is_public ) values ('Experiment, The', 243, '4:18:37', true), ('Joysticks', 214, '1:08:07', true), ('Coco Chanel & Igor Stravinsky', 264, '1:13:26', false), ('Angele', 114, '5:34:55', false), ('Arthur', 100, '0:18:43', false), ('RiP: A Remix Ma...
-- Select burgers_db USE burgers_db; -- insert 3 burgers INSERT INTO burgers (burger_name, devoured) VALUES ('Grass Feed Beef', false); INSERT INTO burgers (burger_name, devoured) VALUES ('Chicken', false); INSERT INTO burgers (burger_name, devoured) VALUES ('Buffalo', false);
-- -------------------------------------------------------- -- 主机: 127.0.0.1 -- 服务器版本: 5.5.5-10.0.14-MariaDB - mariadb.org binary distribution -- 服务器操作系统: Win64 -- HeidiSQL 版本: 8.3.0.4694 -- ------------------------------------------...
/**各シーズンのアクティブプレーヤーの数 SELECT count(player_id) as member_count, league_id, short_title FROM (SELECT DISTINCT player_id, name, league_id, short_title FROM batting_sum b INNER JOIN GAME g on b.game_id=g.game_id INNER JOIN PLAYER p on b.player_id=p.id INNER JOIN league l on g.league_id=l.id)t group by league_i...
UPDATE online_statistics SET statistics=jsonb_set(statistics, '{influence}', '0');
select employee_id, last_name, hire_date from employees where 2008 = to_char(hire_date, 'YYYY') order by employee_id;
CREATE OR REPLACE VIEW "REDLINE"."PNMAC"."VW_STATUSLIFECYCLE" AS SELECT to_char(jd0.prop_key) as prop_key ,j0.journalized_id as issue ,to_char(is0.name) as status_name ,j0.created_on as status_begin ,ifnull(j1.created_on,current_timestamp) as status_end /* ,timestampdiff('day',j0.created_on,j1....
-- OAS001460 Sunniva SELECT c.percentile*10 as percentile, max(c.vt) as ViewTimeMax, c.percentile*10-10 as percentile, min(c.vt) as ViewTimeMin FROM (SELECT b.VT, ntile(10) OVER (order by b.VT) as percentile FROM (SELECT a.deliveryId, sum(a.VT) as VT FROM (SELECT deliveryId, -- refreqlogid sizepct, -- pctInscreen s...
 create PROC [ERP].[Usp_Sel_TipoComprobantePlanCuenta] @IdEmpresa INT AS BEGIN SELECT TCPC.ID, TCPC.IdTipoComprobante, TCPC.IdTipoRelacion, TCPC.IdMoneda, TCPC.IdPlanCuenta, PC.CuentaContable, TCPC.IdSistema, TCPC.Nombre FROM ERP.TipoComprobantePlanCuenta TCPC INNER JOIN ERP.PlanCuenta PC ON P...
CREATE TABLE `Management`.`lock` ( `sudoers-build` INT(1) NOT NULL DEFAULT 0, PRIMARY KEY (`sudoers-build`)); INSERT INTO `Management`.`lock` (`sudoers-build`) VALUES ('0'); GRANT SELECT,UPDATE ON Management.lock TO 'Management'@'localhost'; ALTER TABLE `Management`.`distribution` ADD COLUMN `sftp_port` INT(5) N...
-- delete old data delete from user; delete from product; delete from cart; delete from productincart; -- add a few users (id, first name, last name, username, password, email) insert into user values(1, 'William', 'Bowen', 'wbowen', 'password', 'willwbowen@gmail.com'); insert into user values(2, 'Tam', 'Bowen...
-- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 01, 2021 at 02:00 PM -- Server version: 10.4.20-MariaDB -- PHP Version: 7.3.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE TABLE user_tracking_timing ( id int unsigned NOT NULL AUTO_INCREMENT, page_name text NOT NULL, recorded_at datetime DEFAULT NULL, city text NOT NULL, country text NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8; CREATE TABLE user_tracking_entry ( id...
DROP TABLE IF EXISTS company; CREATE TABLE company ( id INTEGER PRIMARY KEY AUTOINCREMENT, c_name TEXT UNIQUE NOT NULL, c_sid TEXT UNIQUE NOT NULL );
/* 데이터베이스 생성 */ create database market; /* 데이터베이스 이동 */ use market; /* 테이블 생성 */ create table employees( employee_id int(11) primary key, name varchar(200) not null, hourly_pay decimal(10,2), position enum('Manager','Helper','Cashier','Cleaner') not null, employee_contact bigint(10) not null );
/* Created: 12/1/2015 Modified: 12/18/2015 Model: MySQL 5.6 Database: MySQL 5.6 */ -- Create tables section ------------------------------------------------- -- Table member CREATE TABLE `member` ( `mid` Int NOT NULL, `aid` Int NOT NULL, `insid` Int NOT NULL, `dob` Date NOT NULL, `f_name` Varchar(20) NOT...
/*Consulta de actualizacion*/ select * from baphystore.book; update baphystore.book set language = 'Inglés' where book.id = 1; /*Join*/ select book.title, book.author, book.language, book.edition, category.name from baphystore.book inner join baphystore.category on book.id_category = category.id; select book.isbn, bo...
# --- Created by Ebean DDL # To stop Ebean DDL generation, remove this comment and start using Evolutions # --- !Ups create table security_role ( internalid integer auto_increment not null, name varchar(255), constraint pk_security_role primary key (internalid)) ; crea...
/*1: Recuperar o primeiro nome e o sobrenome dos funcionários com salário maior que 5000*/ SELECT FIRST_NAME, LAST_NAME FROM EMPLOYEES WHERE SALARY > 5000 ORDER BY SALARY ASC; /*2: Recuperar o primeiro nome e o sobrenome dos funcionários cujos salários estejam dentro da faixa de 8000 a 10000*/ SELECT FIRST...
alter table tablename drop column ID; alter table tablename add ID int identity(1,1);
/* SQL practice in Udacity's 'Programming for Data Science' Nanodegree Program SQL > Lesson 8 > Project: Investigate the 'Sakila DVD rental database' Section 13: Question Set #2 Question 1: We want to find out how the two stores compare in their count of rental orders during every month for all the years we have data...
SET SERVEROUTPUT ON; CREATE OR REPLACE FUNCTION fncReservaExistente(reserva_ID RESERVA.ID%type) RETURN BOOLEAN AS reserva_no_sistema BOOLEAN; reserva_existe CHAR(1); BEGIN SELECT 'Y' into reserva_existe from reserva r where r.id = reserva_ID; RETURN (reserva_existe LIKE 'Y'); EXCEPTION ...
/** * SQL is use to get informations of customer voice for the display data object on BYFB02 screen * @author ToanNDD * @version $Id: CustomerVoiceEditService_getCustomerVoiceInfor_Sel_01.sql 13950 2014-07-14 14:51:02Z p__toen $ */ SELECT SCV.CUSTOMER_VOICE_ID ,SCV.CST_VOI_KEISAI_STS_KBN ,BU.NAME_SEI AS KE...
--select 'drop table ', table_name, 'cascade constraints;' from user_tables; --select 'drop sequence ', sequence_name, ';' from user_sequences; drop table ENTITY cascade constraints; drop table ROLES cascade constraints; drop table USERS cascade constraints; drop table HOUSEHOLD cascade constraints; drop table R...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Nov 30, 2016 at 04:10 PM -- Server version: 10.1.16-MariaDB -- PHP Version: 5.6.24 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CL...
CREATE TABLE `ri_pregs` ( `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `city_id` varchar(16) DEFAULT NULL, `addt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `fio` varchar(255) NOT NULL DEFAULT '', `bdt` varchar(32) DEFAULT NULL, `gender` char(1) NOT NULL DEFAULT '', `phone` varchar(255) NOT N...
-- CREATE DATABASE "react_gallery" -- TABLE STRUCTURE CREATE TABLE "image_gallery" ( id SERIAL PRIMARY KEY, path VARCHAR(500), description VARCHAR(199), likes NUMERIC DEFAULT 0, favorite_button boolean DEFAULT false ); INSERT INTO "image_gallery" (path, description) VALUES ('images/goat_small....
DROP TABLE if exists "public"."t1" ; CREATE TABLE "public"."t1" ( id int NOT NULL, name varchar(100) NOT NULL, age int, division varchar(200), joined timestamp ) ; DROP TABLE if exists "public"."t2"; CREATE TABLE "public"."t2" ( id int NOT NULL, t1_id int, name varchar(100) ...
DROP TABLE IF EXISTS users; DROP TABLE IF EXISTS devices; DROP TABLE IF EXISTS messages; DROP TABLE IF EXISTS message_recipients; CREATE TABLE users ( username TEXT PRIMARY KEY NOT NULL, master_verify_key TEXT NOT NULL); CREATE TABLE devices ( device_verify_key TEXT PRIMARY KEY NOT NULL, username TEXT N...
DROP TABLE IF EXISTS "TransferAgreement";
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 50147 Source Host : localhost:3306 Source Schema : ttt Target Server Type : MySQL Target Server Version : 50147 File Encoding : 65001 Date: 22/10/2019 16:12:30 *...
DROP VIEW IF EXISTS jordstykker_adgadr_view CASCADE; CREATE VIEW jordstykker_adgadr_view AS ( (SELECT DISTINCT ON (adgangsadresse_id) j.ejerlavkode, j.matrikelnr, a.id as adgangsadresse_id FROM adgangsadresser_mat a JOIN jordstykker j ON ST_Covers(j.geom, a.geom)));
insert into rentcloud_vehicle.vehicle(id, color, make, model, odometerValueOnRegister, type, year) values (1, 'White','VW', 'Beetle',12,'1600 SP',1971);
insert into contact values(10001,'Ranga', 'ranga@gmail.com', '11', '21', 'Walmart', '55 W 6th', 'IL', 'CHICAGO' , 'https://image.freepik.com/free-icon/facebook-logo_318-49940.jpg', '11/27/1994'); insert into contact values(10002,'JP', 'jp@gmail.com', '12', '22', 'Jewel', '48 S 8th', 'IL', 'CHICAGO' , 'https://image.fr...
CREATE TABLE delivery_methods ( id INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Primary Key', name VARCHAR(20) NOT NULL COMMENT 'The name of the delivery method', description VARCHAR(256) NOT NULL COMMENT 'A description of the delivery method', PRIMARY KEY (id) ); INSERT INTO delivery_methods (name...
--TEMA 4 --Popescu Paullo Robertto Karloss Grupa 1311 --1 select concat(concat(s_first, ' '), s_last) as "Nume si Prenume" from student s where 'NULL' not in (select grade from enrollment where s_id=s.s_id); --2 select bldg_code from location where bldg_code not in (select bldg_code from location ...
DROP TABLE IF EXISTS sweets.cookie; DROP TABLE IF EXISTS sweets.eater; CREATE TABLE IF NOT EXISTS sweets.eater ( id INT AUTO_INCREMENT PRIMARY KEY, firstname VARCHAR(50) NOT NULL, lastname VARCHAR(50) NOT NULL, email VARCHAR(50), city VARCHAR(50), street VARCHAR(50), birthday DATE, username VAR...
TRUNCATE TABLE FP_SALES_TAX_T / INSERT INTO FP_SALES_TAX_T (FDOC_NBR,FDOC_LN_TYP_CD,FDOC_LINE_NBR,OBJ_ID,VER_NBR,FIN_COA_CD,ACCOUNT_NBR,FDOC_GRS_SALES_AMT,FDOC_TXBL_SALES_AMT,FDOC_SALE_DT) VALUES ('QU9084604','F',3.0,'13FEFBF14ED141AAE043814FD88141AA',1.0,'BA','6040000',-380.0,-380.0,STR_TO_DATE( '20040401000000', '%...
SELECT A.LEASING_TYPE AS VALUE, B.CODE_NAME AS LABEL FROM CASE_MST A INNER JOIN CODE_MASTER B ON A.CASE_NO = CAST(/*caseNo*/ AS CHAR(4)) AND B.COUNTRY_ID = /*languageId*/ AND B.CODE_TYPE = CAST(/*codeType*/ AS CHAR(3)) AND B.CODE_ID = A.LEASING_TYPE
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; -- -- Table structure for table `transaction` -- CREATE TABLE `transaction` ( `sno` int(3) NOT NULL AUTO_INCREMENT, `sender` text NOT NULL, `receiver` text NOT NULL, `balance` int(8) NOT NULL, `TIMESTAMP` TIMESTAMP NOT...
select * from Funcionarios select IdFuncionario, Nome, Sobrenome from Funcionarios where IdFuncionario = 1;
Q1. /* Para cada Cliente (CompanyName), listar os diferentes Endereços identificando o Tipo de Endereço */ select cst.customerid, companyname, addresstype, addressline1, city, postalcode from customer cst join customer_address csta on cst.customerid = csta.customerid join address a on csta.addressid = a.addressid Q2....
USE auth; SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for gcsc_token -- ---------------------------- DROP TABLE IF EXISTS `gcsc_token`; CREATE TABLE `gcsc_token` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `token` varchar(3000) COLLATE utf8_bin NOT NULL, `user...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 06, 2018 at 05:19 AM -- Server version: 10.1.31-MariaDB -- PHP Version: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
/************ Update: Schemas ***************/ COMMENT ON SCHEMA public IS NULL; /************ Add: Sequences ***************/ CREATE SEQUENCE public.seq_id INCREMENT BY 1; /************ Update: Tables ***************/ /******************** Add Table: public.category ************************/ /* Build Table S...
/* Delete the tables if they already exist */ drop table if exists Movie; drop table if exists Reviewer; drop table if exists Rating; /* Create the schema for our tables */ create table Movie(mID int, title text, year int, director text); create table Reviewer(rID int, name text); create table Rating(rID int, mID int,...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Apr 25, 2019 at 04:58 PM -- Server version: 5.6.41-84.1 -- PHP Version: 7.2.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
USE PracticosBD2 INSERT INTO Departamento VALUES (1, 'ATENCIÓN AL USUARIO'), (2, 'CAPACITACION'), (3, 'RECURSOS HUMANOS'); INSERT INTO Empleado VALUES ('1234', 'PEREZ', '18 DE JULIO', 5500, 'M', 1), ('1345', 'ABELLA', 'YI', 6800, 'F', 1), ('1456', 'SUAREZ', 'CUAREIM', 12000, 'F', 2), ('1567', 'ABELLA', 'GALICI...
-- move this case back to idri per data owner request update patient set trial_dp_pk_id=8 where patient_id='1.3.6.1.4.1.9328.50.3.0496'; update general_image set trial_dp_pk_id=8, project='IDRI' where patient_id='1.3.6.1.4.1.9328.50.3.0496';
-- phpMyAdmin SQL Dump -- version 4.5.2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 15-Maio-2017 às 14:26 -- Versão do servidor: 5.7.9 -- PHP Version: 7.0.0 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /...
use time_series; drop table station_history; CREATE TABLE station_history ( usaf_id ascii, wban_num ascii, station_name ascii, country ascii, state ascii, icao ascii, lat decimal, lon decimal, elev decimal, start_time timestamp, end_time timestamp, PRIMARY KEY (usaf_id, wban_num, lat, lo...
-- CreateTable CREATE TABLE "Theme" ( "id" TEXT NOT NULL, "name" TEXT NOT NULL, "image" TEXT NOT NULL, "template" TEXT NOT NULL, "css" TEXT NOT NULL, "js" TEXT NOT NULL, PRIMARY KEY ("id") );
/*label-增加label*/ /*label_addLabel*/ insert into seava_throwable.t_label(name, type, time) values(@name, @type, @time) /*label-根据label名查询label*/ /*label_queryLabelByName*/ select * from seava_throwable.t_label where name = @name /*label-根据label的id查询label*/ /*label_queryLabelById*/ select * from seava_throwa...
/* Navicat MySQL Data Transfer Source Server : 192.168.8.182_3306 Source Server Version : 50532 Source Host : 192.168.8.182:3306 Source Database : test Target Server Type : MYSQL Target Server Version : 50532 File Encoding : 65001 Date: 2017-07-07 15:02:28 */ SET FO...
-- MySQL Script generated by MySQL Workbench -- 06/09/14 13:53:08 -- Model: New Model Version: 1.0 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- -----------...
START TRANSACTION; CREATE DOMAIN sharding_role AS VARCHAR(255) CHECK( value IN ('none', 'shardsvr', 'configsvr')); CREATE TABLE "risk_groups" ( "id" BIGSERIAL PRIMARY KEY, "name" VARCHAR(255) UNIQUE ); -- CREATE UNIQUE INDEX uix_risk_groups_name ON "risk_groups"("name"); CREATE TABLE "replica_sets" ( "id" BIGSER...
CREATE TABLE bird_colors_info as SELECT color, COUNT(*) FROM birds GROUP BY color;
ALTER TABLE `[#DB_PREFIX#]favorite_tag` ADD INDEX ( `title` ); ALTER TABLE `[#DB_PREFIX#]favorite_tag` ADD INDEX ( `answer_id` );
CREATE TABLESPACE tbs_indice LOCATION '/indice';
SELECT * FROM CUSTOMER_MST WHERE ( CUSTOMER_NAME = /*customerName*/ OR CUSTOMER_ABBR_NAME = /*customerAbbrName*/ ) /*IF (customerCode != null)*/ AND CUSTOMER_MST.CUSTOMER_CODE <> /*customerCode*/'' /*END*/ AND CUSTOMER_MST.DELETE_FLG = CAST(/*fDeleteFlgNormal*/ AS CHAR(1))
\c alpha_dev; drop table if exists product; create table product ( prod_id serial, sku varchar(55), supplier_item_id varchar(55), supplier_id varchar(255), brand_id varchar(255), category_id smallint, active boolean, cdate timestamp, mdate timestamp, primary key (sku) ...