text
stringlengths
6
9.38M
DROP TABLE IF EXISTS CUSTOMER_IDIOSYNCRATIC_TRANSPOSE_STAGE; CREATE TABLE CUSTOMER_IDIOSYNCRATIC_TRANSPOSE_STAGE ( ITERATIONID INTEGER, CUSTOMER VARCHAR(50), PD DECIMAL(10,2), VERSION ...
CREATE TABLE users( user_id serial PRIMARY KEY, username VARCHAR (50) UNIQUE NOT NULL, password text NOT NULL, email VARCHAR (355) UNIQUE NOT NULL, firstname VARCHAR (50) NOT NULL, lastname VARCHAR (250) NOT NULL, created_on TIMESTAMP NOT NULL, fav_jokes integer ARRAY );
DELETE FROM ies_cursos_informaciones_general CASCADE; DELETE FROM ies_cursos_duracion CASCADE; DELETE FROM ies_cursos_archivos CASCADE; DELETE FROM ies_cursos_requisitos CASCADE; DELETE FROM ies_cursos_menciones CASCADE; DELETE FROM ies_curso_lugares_instruccion CASCADE; DELETE FROM ies_curso_detalles_de_regularizacion...
ALTER TABLE api_keys ADD COLUMN unsalted_key varchar(1000); CREATE INDEX idx_api_keys_unsalted ON api_keys(unsalted_key);
-- Mathematical functions and operators in SQL -- Example 1: For business SQL queries, use of mathematical operators are very -- -- common so we will explore them. Remember, everything happens within columns. -- All operations will be performed within one or more columns. -- Find the percentage of a rental rate is...
drop table if exists `robots`; CREATE TABLE `robots` ( `id` bigint(10) unsigned NOT NULL COMMENT 'ID,主键,同users表ID', `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '机器人代号', `status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态:0 - 正常(NORMAL),1 - 锁定(LOCKED),2 - 删除(DELETED)', `creat...
/* * Inspecting the Reuters Data Set; Basic Relational Algebra */ /* Select */ SELECT count(*) FROM ( SELECT * FROM frequency WHERE docid="10398_txt_earn" ); /* Select Project */ SELECT count(*) FROM ( SELECT term FROM frequency WHERE docid="10398_txt_earn" AND count=1 ); /* Union */ ...
CREATE TABLE IF NOT EXISTS notifications ( title VARCHAR(255) NOT NULL, description TEXT, notification_id INT NOT NULL, user_id INT NOT NULL, PRIMARY KEY (notification_id) ) ENGINE=INNODB;
DELIMITER $$ DROP PROCEDURE IF EXISTS iniciarTransaccion $$ CREATE PROCEDURE iniciarTransaccion () START TRANSACTION; $$ DROP PROCEDURE IF EXISTS CancelarTransaccion $$ CREATE PROCEDURE cancelarTransaccion () ROLLBACK; $$ DROP PROCEDURE IF EXISTS AplicarTransaccion $$ CREATE PROCEDURE aplicarTransaccion () COMMIT...
-- Added on Nikit's instruction. I'm told there were case sensitivity issues with an old table name. DROP PROCEDURE IF EXISTS account_inserts # CREATE PROCEDURE account_inserts(IN account_id_val INT(11), IN tsstarted_val DATETIME, IN platform_val VARCHAR(64), IN start_page_val VARCHAR(2048)) BEGIN DECLARE user_i...
CREATE TABLE TNDS_M_DEN_TRUE_DAYS ( CHG_DIV VARCHAR2 (1), PRAC_ACT_CD VARCHAR2 (9) NOT NULL ENABLE, NOTIF_NO_DIV VARCHAR2 (1), NOTIF_NO_DIV_NO VARCHAR2 (3), NOTIF_NO_BRNC_NO VARCHAR2 (2), NOTIF_NO_ITEM_NO VARCHAR2 (2), AD...
CREATE TABLE apolice_seguro ( id BIGINT(20) PRIMARY KEY AUTO_INCREMENT, protecao_causas_naturais bit(1) DEFAULT NULL, protecao_roubo bit(1) DEFAULT NULL, protecao_terceiro bit(1) DEFAULT NULL, valor_franquia decimal(16,2) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Database creation for Laravel 6 CRUD API: -- Creation of Database and suitable DB user (Important: create user with mysql_native_password on MySQL 8.0+) -- mysql -u root -p (run this in shell first) CREATE DATABASE LaravelCrudApi; CREATE USER 'crudapiuser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'RRdsf...
SELECT * FROM bbd.countries;
USE TSQLV4; INSERT INTO Production.Suppliers (companyname, contactname, contacttitle, address, city, postalcode, country, phone) VALUES(N'Supplier XYZ', N'Jiru', N'Head of Security', N'42 Sekimai Musashino-shi', N'Tokyo', N'01759', N'Japan', N'(02) 4311-2609');
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: May 08, 2018 at 08:27 AM -- Server version: 10.1.30-MariaDB -- PHP Version: 5.6.33 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- Question 1.2 -- Création de la table classement si elle n'existe pas CREATE TABLE classement ( dossard int, temps int, PRIMARY KEY (dossard) ); -- Insertion de donnée dans cette table INSERT INTO classement(dossard,temps) VALUES(1,4523); INSERT INTO classement(dossard,temps) VALUES(2,3134); INSERT INTO classe...
-- MySQL dump 10.13 Distrib 5.1.49, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: zp_world -- ------------------------------------------------------ -- Server version 5.1.49-1ubuntu8.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARAC...
select rjhs_grants.grant_permission();
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 24 Jan 2018 pada 02.56 -- Versi Server: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
SELECT teachers.name AS "teacher", students.name AS "student", assignments.name AS "assignment", (completed_at - started_at) AS "duration" FROM assistance_requests JOIN teachers ON teacher_id = teachers.id JOIN students ON student_id = students.id JOIN assignments ON assignment_id = assignments.id ORD...
-- Diarios SELECT dp.nombre_completo, fid.total_ingreso_dia, dt.fecha FROM DatamartIngresos.fac_ingresos_diarios fid INNER JOIN DatamartIngresos.dim_tiempo dt ON ( fid.fecha_ingreso = dt.id_fecha ) INNER JOIN DatamartIngresos.dim_persona dp ON ( dp.id_persona = fid.id_persona ) WHERE DATE_FORMAT( dt.fecha, "%Y-%m-%d"...
/*==============================================================*/ /* DBMS name: MySQL 5.5 */ /* Created on: 2014/10/22 21:41:03 */ /* Author : denghp */ /*==================================================...
//Create the nodes // Generated most of this in google sheets CREATE (n1: Object {name:'Contact'}) CREATE (n2: Field {name:'First Name', type:'Text'}) CREATE (n3: Field {name:'Last Name', type:'Text'}) CREATE (n4: Field {name:'Email', type:'Email'}) CREATE (n5: Field {name:'Gender', type:'Picklist'}) CREATE (n6:...
-- Include table data insertion, updation, deletion and select scripts ---------------------------------------------------------------------- -- Adding movies in movie_list table-------------------------------------- ---------------------------------------------------------------------- insert into movie_list values ...
insert into users (id, firstname, lastname, email) values ('100001', 'MARTINA', 'jindal', 'martina.jindal@saiglobal.com'); -- orders table insert into orders (id, matterRef, type, status, createdAt) values ('100001', 'SAI Office Inquiry', 'Property Information Report', 'Completed', '2018-10-14'); insert ...
CREATE TABLE public.officers AS SELECT id as id, lastname as last_name, firstname as first_name, address1 as address1, address2 as address2, city as city, state as state, zip as zip, title as title, phone as phone, redactionrequ...
drop table if exists feedback cascade; drop table if exists fiz_person cascade; drop table if exists ur_person cascade; drop table if exists client_booking cascade; drop table if exists booking cascade; drop table if exists status_booking cascade; drop table if exists type_booking cascade; drop table if exists ...
delimiter $$ CREATE PROCEDURE UtilizadoresDeUmDadoSexo (IN sex CHAR(1)) BEGIN SELECT Email, nome, DataNascimento FROM cliente WHERE sexo = sex; END $$ CALL UtilizadoresDeUmDadoSexo ("M"); delimiter $$ CREATE PROCEDURE UtilizadoresDeUmDadoSexoComRestriçãoDeData (IN sex CHAR(1), dat1 Date) BEGIN SELECT Email, nome, ...
-- MySQL Script generated by MySQL Workbench -- Mon Jul 22 09:58:36 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_M...
select TZ_JG_ID, TZ_SKIN_ID from PS_TZ_SITEI_DEFN_T where TZ_SITEI_ID=?
USE Gringotts --Problem 1. Records’ Count SELECT COUNT(*)FROM WizzardDeposits --Problem 2. Longest Magic Wand SELECT MAX(MagicWandSize) AS LongestWandSize FROM WizzardDeposits --Problem 3. Longest Magic Wand per Deposit Groups SELECT ĺ.DepositGroup,MAX(ĺ.MagicWandSize) AS LongestMagicWand FROM WizzardDeposits ĺ GRO...
INSERT INTO `users` (`user_id`, `username`) VALUES (1, 'maydaymayday');
drop table if exists zone_zone2_mapping; drop table if exists temp_zone_zone2_mapping; --get the intersection of the zone centroid with the level2 zone select o.id as zone, z2.id as zone_lvl2 into temp_zone_zone2_mapping from ontario_zones as o, level2_zones as z2 WHERE CAST (z2.pruid AS INTEGER) = 35 and ST_Interse...
USE pushchat; SET NAMES utf8; DROP TABLE IF EXISTS active_users; CREATE TABLE active_users ( user_id varchar(40) NOT NULL PRIMARY KEY, device_token varchar(64) NOT NULL, nickname varchar(255) NOT NULL, secret_code varchar(255) NOT NULL, ip_address varchar(32) NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50704 Source Host : localhost:3306 Source Database : sys Target Server Type : MYSQL Target Server Version : 50704 File Encoding : 65001 Date: 2016-05-12 23:10:04 */ SET FOREIGN_KEY_CHECKS=0; -- -----...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 27, 2021 at 10:07 AM -- Server version: 10.4.19-MariaDB -- PHP Version: 7.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: Aug 08, 2016 at 05:04 AM -- Server version: 10.1.10-MariaDB -- PHP Version: 7.0.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI...
delete from HtmlLabelIndex where id=23084 / delete from HtmlLabelInfo where indexid=23084 / INSERT INTO HtmlLabelIndex values(23084,'不存在') / INSERT INTO HtmlLabelInfo VALUES(23084,'不存在',7) / INSERT INTO HtmlLabelInfo VALUES(23084,'not exist',8) / INSERT INTO HtmlLabelInfo VALUES(23084,'不存在',9) /
-- this can only be run on updates from 380rc2 to 380! ALTER TABLE file ADD COLUMN file_descrip TEXT NOT NULL DEFAULT ''; UPDATE file SET file_descrip = file_title; ALTER TABLE file ALTER COLUMN file_descrip DROP DEFAULT;
insert into CMDS_M_VLD_FLG values('1','有効'); insert into CMDS_M_VLD_FLG values('1','無効を含む'); insert into CMDS_M_VLD_FLG values('0','無効を含む'); commit;
USE `LostandFound`; DROP PROCEDURE IF EXISTS `proc_update_password_question`; delimiter // CREATE PROCEDURE `proc_update_password_question`( IN `id` INT, IN `security_answer` VARCHAR(100), IN `new_password` CHAR(32) ) BEGIN declare tmp int; set tmp=(select count(1) from `user` where `user`.id=id and `user`.`sec...
/*Script de criação de banco de dads*/ use robotinicsdb; /*drop table security;*/ CREATE TABLE security ( camera int, filename char(80) not null, frame int, file_type int, time_stamp timestamp, event_time_stamp timestamp );
INSERT INTO burgers (burger_name, devoured) VALUES ("Black Pearl", true); INSERT INTO burgers (burger_name, devoured) VALUES ("Whooper", false); INSERT INTO burgers (burger_name, devoured) VALUES ("Avocado Burger", false); INSERT INTO burgers (burger_name, devoured) VALUES ("Mystery Burger", false); INSERT INTO burgers...
select type, name from sys.objects where type in ('U','V','P','FN','TR') order by type, name --new line
-- 01. Find names of all employees by first name SELECT FirstName, LastName FROM Employees WHERE LEFT(FirstName, 2) = 'sa' -- 02. Find names of all employees by last name SELECT FirstName, LastName FROM Employees WHERE LastName LIKE '%ei%' ESCAPE '!' -- 03. Find first names of all employees SELECT FirstName FROM Em...
-- Adminer 4.7.1 PostgreSQL dump \connect "default"; DROP TABLE IF EXISTS "items"; DROP SEQUENCE IF EXISTS items_id_seq; CREATE SEQUENCE items_id_seq INCREMENT 1 MINVALUE 1 MAXVALUE 2147483647 START 1 CACHE 1; CREATE TABLE "public"."items" ( "id" integer DEFAULT nextval('items_id_se...
--enables CLR access, which is disabled by default. sp_configure 'clr enabled', 1; RECONFIGURE; --installs the sql extensions dll into sql server. USE [<THE_DATABASE_TO_INSTALL_INTO>]; CREATE ASSEMBLY SQLExtensions FROM 'C:\Code\SQLExtensions\SQLExtensions\bin/Debug/SQLExtensions.dll' WITH PERMISSION_SET = SAFE; --i...
CREATE VIEW CMDV_T_RCP_PHA_KO AS SELECT SEQ1_NO , SEQ2_NO , VLD_FLG , REC_IDENT_INFO , DEFRAYER_NO , EX_GRATIA_PAY_DIV , PRSPT_RCPTN_TIMES , TOTAL_SCORE , RESERVE_01 , PART_BURD , RESERVE_02 , PUB_MONEY_PAY_PART_BURD , PRAC_YM , INPUT_YM FROM TNDS_T_RCP_PHA_KO W...
<?php /** * @file DeleteExerciseAttachment.sql * deletes an specified attachment from %Attachment table * @author Till Uhlig * @param int \$eid a %Exercise identifier * @result - */ ?> DELETE FROM Attachment WHERE E_id = '<?php echo $eid; ?>'
-- SELECT * FROM test_form WHERE name LIKE '名前%'; SELECT * FROM test_form WHERE name LIKE '%名前%'; SELECT * FROM test_form WHERE name LIKE '%名前'; -- 使用頻度としては低め -- SELECT * FROM test_form WHERE post LIKE '123%';
-- -- Base de datos: `mi-presupuesto` -- CREATE DATABASE IF NOT EXISTS `mi-presupuesto`; USE `mi-presupuesto`; -- -------------------------------------------------------- -- -- Estructura de tabla para la tabla `accounts` -- CREATE TABLE `accounts` ( `email` varchar(50) NOT NULL, `password` varchar(50) NOT NULL...
ALTER table workflow_selectitem add cancel varchar2(1) default 0 / CREATE OR REPLACE PROCEDURE workflow_selectitembyid_new ( id_1 VARCHAR2, isbill_1 VARCHAR2, flag OUT INTEGER, msg OUT VARCHAR2, thecursor IN OUT cursor_define.weavercursor ) AS BE...
CREATE TABLE applications ( application_id serial PRIMARY KEY, name text NOT NULL, description text NOT NULL, owner text NOT NULL, repository text NOT NULL, has_entry_point boolean NOT NULL, updated_date_time timestamptz NOT NULL ); CREATE TABLE deployments ( deployment_id serial PRIM...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Mar 27, 2021 at 07:04 AM -- Server version: 10.4.18-MariaDB -- PHP Version: 7.3.27 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
CREATE TABLE users ( id int, name text, email text, PRIMARY KEY (id) ) ;
CREATE TABLE CRAWLER_TABLE_GENERATOR( IID INTEGER, GGEN_NAME VARCHAR(255) NOT NULL, GGEN_VALUE VARCHAR(255), PRIMARY KEY (IID) )ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE CRAWLER_USER( IID INTEGER, IIP VARCHAR(255), TTOTAL INTEGER, AACTION_FACTOR DOUBLE...
/* EXIBE O ESPACO OCUPADO POR UM DATABASE */ --ta errada a maneira de calcular os redos, se tiver numero diferente de membros. SET verify OFF COLUMN "Total Gb" FORMAT 99,999.0 COLUMN "Redo Gb" FORMAT 99,999.0 COLUMN "Temp Gb" FORMAT 99,999.0 COLUMN "Data Gb" FORMAT 99,999.0 Prompt Prompt "Database ...
CREATE TABLE `usuarios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `email` varchar(45) NOT NULL, `contrasena` varchar(200) NOT NULL, `nombre` varchar(50) NOT NULL, `apellido` varchar(45) DEFAULT NULL, `perfil` int(11) NOT NULL, `Estatus` varchar(10) NOT NULL DEFAULT 'Activo', PRIMARY KEY (`id`) ) ENGINE=In...
select * from Transaction order by transactionID desc limit 4,3
/*============================== TRUY VẤN DỮ LIỆU (DB_6_2) =============================*/ /*======================================================================================*/ -- Question 1: Tạo store để người dùng nhập vào tên phòng ban và in ra tất cả các account thuộc phòng ban đó DELIMITER $$ DROP PROCEDURE ...
create table user_account ( id SERIAL PRIMARY KEY FirstName VARCHAR(256) LastName VARCHAR(256) Email VARCHAR(256) Votes INT )
--EX3: CREATE MATERIALIZED VIEW ex3_view SELECT ex.conf, ex.repeticio, ex.method, ex.k, ex.m, ex.sigma, ex.id, dt.name, v.dades FROM v2_experiments ex, v2_datasets dt, v2_vectors v, v2_outliers ou WHERE dt.name=v.id_dataset and dt.name=ou.id_dataset; --consulta 1: SELECT ex.id, ex.conf, ex.method, ex.repeticio FROM v...
select c.UserId , fu.Lastname , fu.Firstname , fu.Fathername , isnull(uai.FactRegion, uai.RegRegion) as Region , c.Id as CreditId , c.DateStarted , cs.Description as CreditStatus , c.Amount , c.IpAddress , p.CardNumber from dbo.Credits c inner join dbo.Payments p on p.Id = c....
--Table #1: teacher(id, dept, name, phone, mobile) --Table #2: dept(id, name) --1. List the teachers who have NULL for their department. SELECT name FROM teacher WHERE dept IS NULL; --2. The inner join that misses the teachers with no department and the departments with no teacher. SELECT teacher.name, dept.name...
insert dbo.br12317 select cast(id as int) as ClientId , N'Манго_0.11-0.20' as Type --into dbo.br12317 from client.Client where id in ( ) / drop table if exists #op ; select * into #op from col.tf_op('19000101', '20190723') ; create index IX_op_ProductId_AssignDate_LastDayWasAssigned on #op(ProductId, Assign...
update LgcAssetUnit set unitmark=id /
USE ordermgr; CREATE TABLE `purchase_order_notes` ( `notes_id` int(11) NOT NULL AUTO_INCREMENT, `PURCHASE_ORDER_ID` int(11) NOT NULL, `notes` varchar(200) DEFAULT NULL, `created_by` varchar(20) DEFAULT NULL, `created_on` datetime DEFAULT NULL, PRIMARY KEY (`notes_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ...
PREFIX db: <http://dbpedia.org/resource/> SELECT distinct * WHERE { ?s ?o db:Europe . FILTER NOT EXISTS {db:UK ?o ?p } } LIMIT 50
INSERT INTO PERSON (ID, NAME, LOCATION, BIRTH_DATE) VALUES (100001, 'June', 'Seoul', SYSDATE()); INSERT INTO PERSON (ID, NAME, LOCATION, BIRTH_DATE) VALUES (100002, 'Alpha', 'Google', SYSDATE()); INSERT INTO PERSON (ID, NAME, LOCATION, BIRTH_DATE) VALUES (100003, 'Zero', 'Space', SYSDATE());
CREATE TABLE depts( deptId INT AUTO_INCREMENT PRIMARY KEY, deptName VARCHAR(20) ) INSERT INTO `depts`(`deptName`) VALUES ('Administration'); INSERT INTO `depts`(`deptName`) VALUES ('Marketing'); INSERT INTO `depts`(`deptName`) VALUES ('Purchasing'); INSERT INTO `depts`(`deptName`) VALUES ('Human Resources'); INSE...
SELECT first_name, email FROM customers;
SELECT COUNT(*) FROM KNOWLEDGE_HISTORIES WHERE DELETE_FLAG = 0;
DROP TABLE IF EXISTS `usuario`; CREATE TABLE IF NOT EXISTS `usuario` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `email` varchar(255) COLLATE latin1_bin NOT NULL, `senha` varchar(255) COLLATE latin1_bin NOT NULL, `nome` varchar(45) COLLATE latin1_bin DEFAULT NULL, `cpf` varchar(14) COLLATE latin1_bin NO...
UPDATE vote.apt2553_central SET province_lat = '13.757127' , province_lon = '100.477982' WHERE province = 'กรุงเทพมหานคร' ; UPDATE vote.apt2553_central SET province_lat = '14.738495' ,province_lon = '99.016571' WHERE province = 'กาญจนบุรี'; UPDATE vote.apt2553_central SET province_lat = '13....
CREATE TABLE `course_registrations` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `term` varchar(18) COLLATE utf8mb4_unicode_ci NOT NULL, `midterm_exam_grade` int(11) NOT NULL, `final_exam_grade` int(11) NOT NULL, `final_course_grade` int(11) NOT NULL, `participation_grade` int(11) NOT NULL, `attend...
insert into KeyActions ( KeyActionId, KeyActionKind, KeyActionContent, UsageCount, Comment, [CreatedTimestamp], [CreatedAccount], [CreatedProgramName], [CreatedProgramVersion], [UpdatedTimestamp], [UpdatedAccount], [UpdatedProgramName], [UpdatedProgramVersion], [UpdatedCo...
-- -------------------------------------------------------- -- Host: 172.27.1.32 -- Server version: 5.7.32-0ubuntu0.16.04.1 - (Ubuntu) -- Server OS: Linux -- HeidiSQL Version: 10.2.0.5599 -- -------------------------------------------------------...
DROP INDEX ips_server_asn; DROP INDEX ips_server_cc; DROP INDEX ips_edns_asn; DROP INDEX ips_edns_cc; DROP INDEX ips_client_asn; DROP INDEX ips_client_cc;
insert into categories (id, ordinal) VALUES (1, 10), (2, 20); insert into categories_i18n (category_id, locale_language, name, pretty_url_fragment) values (1, 'en', 'Fruits', 'fruits'), (1, 'de', 'Obst', 'obst'), (2, 'en', 'Vegetables', 'vegetables'), (2, 'de', 'Gemüse', 'gemuese'); insert into products (...
-- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64) -- -- Host: localhost Database: spa -- ------------------------------------------------------ -- Server version 8.0.20 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; ...
CREATE LOGIN ap_demo WITH PASSWORD = 'ap_demo', DEFAULT_DATABASE=Demo
-- HAVING Challenge -- Challenge 1: We are launching a platinum service for our most loyal customers. We will assign -- platinum status to customers that have had 40 or more transaction payments. -- What customer id's are eligible for platinum status? SELECT customer_id, COUNT(amount) FROM payment GROUP BY custom...
CREATE DATABASE IF NOT EXISTS d0166923; USE d0166923; CREATE TABLE IF NOT EXISTS users ( id INT AUTO_INCREMENT PRIMARY KEY, email VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, publisher boolean not null default 0, created DATETIME, modified DATETIME ); CREATE TABLE IF NOT EXISTS pictures ( id INT AUT...
/*---1st part----------------------------*/ /* import from csv to spatialite*/ select initspatialmetadata(1) select addgeometrycolumn('UMBW', 'geometry', 4326, 'POINT' ) update "UMBW" set geometry = makepoint(cast( replace ("X_Koordinate", ',','.') as real) ,cast( replace (Y_Koordinate, ',','.') as real) ,4326) ...
CREATE TABLE `category_question` ( `category_question_id` int unsigned NOT NULL AUTO_INCREMENT, `category_id` int unsigned NOT NULL, `question_id` int unsigned NOT NULL, `order` int unsigned NOT NULL, PRIMARY KEY (`category_question_id`), UNIQUE KEY `category_id_question_id` (`category_id`, `question_id`), ...
-- -- Table structure for table `email_confirmation` -- DROP TABLE IF EXISTS `email_confirmation`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `email_confirmation` ( `id` int NOT NULL AUTO_INCREMENT, `user_id` int NOT NULL, `token` v...
SELECT * FROM VIEW_HISTORIES ORDER BY INSERT_DATETIME %s LIMIT ? OFFSET ?;
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 16, 2017 at 12:59 AM -- Server version: 10.1.25-MariaDB -- PHP Version: 7.1.7 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
/* Navicat Premium Data Transfer Source Server : mysql Source Server Type : MySQL Source Server Version : 80018 Source Host : localhost:3306 Source Schema : News_db Target Server Type : MySQL Target Server Version : 80018 File Encoding : 65001 Date: 14/11/2019 23:01:...
alter table organisations drop column active;
-- ----------------------------------------------------- -- Table `olist`.`time` -- ----------------------------------------------------- DROP TABLE IF EXISTS `olist`.`time` ; CREATE TABLE IF NOT EXISTS `olist`.`time` ( `time_id` TIMESTAMP NOT NULL, PRIMARY KEY (`time_id`)) ENGINE = InnoDB COMMENT = 'This table c...
ALTER TABLE insert_lock OWNER TO postgres; SET search_path = public, pg_catalog; CREATE TABLE t_abnormal_log ( id integer NOT NULL, net_type integer, abnormal_time character varying(20), content text ); ALTER TABLE t_abnormal_log OWNER TO postgres; CREATE SEQUENCE t_abnormal_log_id_seq START WITH ...
ALTER TABLE HrmUserSetting ADD theme varchar(100) / ALTER TABLE cowork_label ADD isUsed integer null / ALTER TABLE cowork_label ADD labelOrder integer null / ALTER TABLE cowork_label ADD labelType varchar2(100) null / ALTER TABLE cowork_label RENAME COLUMN icon TO labelColor / CREATE OR REPLACE PROCEDURE ...
-- WEB-4173 - drop MAXIMILES_ID (aka USER_ID, aka PLAYER_PROFILE_ID) ALTER TABLE rpt_recent_registrations ADD COLUMN PLAYER_ID BIGINT(11) NULL# UPDATE rpt_recent_registrations rrr, LOBBY_USER_INFO lui SET rrr.PLAYER_ID=lui.PLAYER_ID WHERE rrr.USER_ID=lui.USER_ID# ALTER TABLE rpt_recent_registrations CHANGE PLAYER_ID...
-- +migrate Up CREATE TABLE IF NOT EXISTS `SIGNAL_EVENTS` ( `time` TIMESTAMP PRIMARY KEY NOT NULL, `product_code` VARCHAR(50), `side` VARCHAR(10), `price` float, `size` float ); -- +migrate Down DROP TABLE IF EXISTS `SIGNAL_EVENTS`;
CREATE TABLE user_tokens ( tokenid TEXT NOT NULL, expires BIGINT NOT NULL, userid INT NOT NULL, host TEXT NOT NULL, useragent TEXT NOT NULL );
-- +migrate Up ALTER TABLE protest ADD organizer TEXT; -- +migrate Down ALTER TABLE protest DROP COLUMN organizer;
-- Making this way easier: DELETE FROM music_audiofile; CREATE TABLE `music_email` ( `id` int(11) AUTO_INCREMENT NOT NULL PRIMARY KEY, `created` datetime NOT NULL, `modified` datetime NOT NULL, `email` varchar(255) NOT NULL UNIQUE, `upload_key` varchar(255) NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8...
DROP DATABASE IF EXISTS reviews; CREATE DATABASE reviews; \c reviews; CREATE TABLE IF NOT EXISTS reviewData ( id SERIAL PRIMARY KEY )