text
stringlengths
6
9.38M
CREATE TABLE IF NOT EXISTS users ( id SERIAL PRIMARY KEY, first_name TEXT NOT NULL, last_name TEXT NOT NULL, username TEXT NOT NULL UNIQUE, password TEXT NOT NULL, age INTEGER NOT NULL, country TEXT NOT NULL, nickname TEXT, gender TEXT NOT NULL, block_list BOOLEAN NOT NULL DEFAUL...
create table if not exists users ( username text not null unique, password_hash text not null, is_admin int not null default 0 );
SET MODE DB2; -- First throw away all stuff DROP TABLE VWIM0001DESIGN_AUTHORITY IF EXISTS; DROP TABLE VWIM0002DOMAIN IF EXISTS; DROP TABLE VWIM0003APP IF EXISTS; DROP TABLE VWIM0004KOMP IF EXISTS; DROP TABLE VWIM0005SOFTWAREART IF EXISTS; DROP TABLE VWIM0007RISIKOEINWERTUNG IF EXISTS; DROP TABLE VWIM0008DATENSCHUTZEIN...
SELECT BuriState.dataid , BuriState.branchid , BuriState.pathid , BuriState.processdate , BuriState.versionno , BuriState.insertdate , BuriState.useridnum , BuriState.useridval , BuriState.stateid , BuriState.abortdate FROM BuriState WHERE processDate > CURRENT_TIMESTAMP
-- Create climbing statistics table DROP TABLE climbing_statistics CREATE TABLE climbing_statistics ( id SERIAL PRIMARY KEY, date VARCHAR, route VARCHAR, attempted INT, succeeded INT, success_percentage INT ); -- Create weather statistics table CREATE TABLE weather ( date VARCHAR PRIMARY KEY, temp_avg INT, rela...
-- 请在这里编写一条SQL语句,创建一个名为USER的表,其中的列如下 CREATE TABLE `USER` ( `ID` BIGINT(10) NOT NULL AUTO_INCREMENT COMMENT 'ID', `NAME` VARCHAR(100) NOT NULL COMMENT '用户名', `TEL` VARCHAR(20) NOT NULL COMMENT '电话', `ADDRESS` VARCHAR(100) DEFAULT NULL COMMENT '地址', `CREATED_AT` TIMES...
-- a new simplified version of user to roles relation table INSERT INTO user_role SELECT user_id, role_id FROM user_role_context_object GROUP BY user_id, role_id;
CREATE OR REPLACE VIEW my_users AS SELECT * FROM users;
insert into utilisateur(login,password,type) values('affolabp','affolabp',2); insert into utilisateur(login,password,type) values('agnerayq','agnerayq',2); insert into utilisateur(login,password,type) values('aitelhaa','aitelhaa',2); insert into utilisateur(login,password,type) values('alaerm','alaerm',2); insert into ...
DROP TABLE IF EXISTS report_manager_schema.report_parameters; CREATE TABLE report_manager_schema.report_parameters ( report_id uuid, parameter_id uuid, datetime_parameter_added timestamp without time zone NOT NULL, changing_user_login text NOT NULL, CONSTRAINT report_parameters_pkey PRIMARY KEY (report_i...
# # Table structure for table 'sys_language' # CREATE TABLE sys_language ( hreflang varchar(5) DEFAULT '' NOT NULL, );
CREATE PROCEDURE SelectFeaturedProducts AS BEGIN SELECT * FROM Products WHERE Product.CategoryId IN (1,2,3) END;
use tianque; -- 组织表 DROP TABLE IF EXISTS `tq_team`; CREATE TABLE `tq_team` ( `TEAMID` int(11) NOT NULL AUTO_INCREMENT COMMENT '组织id', `TEAMNAME` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '组织名\r\n', `TEAMINDEX` int(255) NULL DEFAULT NULL COMMENT '排序', `DESCRIBE` varchar(300) CHARA...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 17, 2020 at 09:48 PM -- Server version: 10.1.37-MariaDB -- PHP Version: 7.2.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
CREATE TABLE ShohinSaeki (shohin_id CHAR(4) NOT NULL, shohin_mei VARCHAR(100) NOT NULL, hanbai_tanka INTEGER, shiire_tanka INTEGER, saeki INTEGER, PRIMARY KEY(shohin_id)); INSERT INTO ShohinSaeki SELECT shohin_id, shohin_mei, hanbai_tanka, shiire_tanka, hanbai_tanka - shiire_tanka AS sa...
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 10.4.12-MariaDB - mariadb.org binary distribution -- Server OS: Win64 -- HeidiSQL Version: 10.2.0.5599 -- -----------------------------------------------...
/* Warnings: - The migration will add a unique constraint covering the columns `[slug]` on the table `users`. If there are existing duplicate values, the migration will fail. */ -- AlterTable ALTER TABLE "users" ADD COLUMN "slug" TEXT; -- CreateIndex CREATE UNIQUE INDEX "users.slug_unique" ON "users"("slug")...
INSERT INTO subject (id, name, short_name) VALUES (1, 'Проектирование информационных систем', 'ПрИС') ON CONFLICT DO NOTHING; INSERT INTO subject (id, name, short_name) VALUES (2, 'Системы искусственного интеллекта', 'СИИ') ON CONFLICT DO NOTHING; INSERT INTO subject (id, name, short_name) VALUES (3, 'Программная инж...
DROP DATABASE IF EXISTS testdb; CREATE DATABASE testdb; USE testdb; DROP TABLE IF EXISTS CREDIT; CREATE TABLE CREDIT ( ID INT NOT NULL AUTO_INCREMENT, STATUS VARCHAR(200), AMOUNT DOUBLE, APPLICATION_SIGNED_HOUR INT, APPLICATION_SIGNED_WEEKDAY INT, CITY VARCHAR(200), COUNTRY VARCHAR(200), CREDIT_SCORE_ES_EQUIFAX_RIS...
CREATE TABLE public.da_district ( district_cd character varying(8) NOT NULL, district_name character varying(64), district_desc character varying(64), state_cd character varying(8), country_cd character varying(8), grp_cd character varying(15) NOT NULL, record_status character(1), dw_las...
SELECT Username, LastName, CASE WHEN PhoneNumber IS NULL THEN 0 ELSE 1 END AS [Has Phone] FROM Users ORDER BY LastName, Id
-- This is the MySql Sakai 1.5 -> 2.0 conversion script -- new tables will be established by running auto-ddl. If this is not desired, you must manually -- create the tables for any new Sakai feature -- tables were renamed alter table CHEF_EVENT rename to SAKAI_EVENT; alter table CHEF_DIGEST rename to SAKAI_DIGEST; ...
UPDATE users SET verified = true WHERE verified_link = $1; SELECT * FROM users;
DROP table IF EXISTS btj_joblevel; CREATE TABLE btj_joblevel ( num int(11) NOT NULL default '0', code varchar(10) , cvalue varchar(50), content text, PRIMARY KEY (num) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO btj_joblevel (num, code, cvalue, content) VALUES (1, '1', ...
SELECT u.[Username], c.Name FROM Reports AS r LEFT JOIN Users AS u ON r.UserId = u.Id LEFT JOIN Categories AS c ON r.CategoryId = c.Id WHERE DAY(r.OpenDate) = DAY(u.Birthdate) AND MONTH(r.OpenDate) = MONTH(u.Birthdate) ORDER BY u.Username, c.Name
-- hjælpetekster. INSERT INTO Hjaelpetekst(tekst) VALUES('Beklædning af skur 1 på 2'); INSERT INTO Hjaelpetekst(tekst) VALUES('beklædning af gavle 1 på 2'); INSERT INTO Hjaelpetekst(tekst) VALUES('byg-selv spær (skal samles) ? stk.'); INSERT INTO Hjaelpetekst(tekst) VALUES('løsholter til skur gavle'); INSERT INTO Hjael...
 CREATE PROC [ERP].[Usp_Sel_Reporte_AsientoDetalle_Concar] @IDS VARCHAR(MAX) AS BEGIN SELECT '06' SubDiario, RIGHT('00' + LTRIM(RTRIM(MONTH(AD.Fecha))), 2) + RIGHT('0000' + LTRIM(RTRIM(A.Orden)), 4) NumeroComprobante, FORMAT(AD.Fecha,'dd/MM/yyyy') FechaComprobante, 'MN' CodigoMoneda, AD.Nombre GlosaP...
-- Problem 14 CREATE DATABASE CarRental USE CarRental CREATE TABLE Categories ( Id int IDENTITY PRIMARY KEY, CategoryName nvarchar(50) NOT NULL, DailyRate decimal(7,2) NOT NULL, WeeklyRate decimal(7,2) NOT NULL, MonthlyRate decimal(7,2) NOT NULL, WeekendRate decimal(7,2) NOT NULL ) CREATE TABLE Cars ( Id int IDENTIT...
/* Formatted on 21/07/2014 18:33:43 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRE0_APP_GEST_ADVISOR ( COD_ABI_CARTOLARIZZATO, COD_NDG, COD_SNDG, COD_MACROSTATO, ID_ADVISOR_CONSULENZA, ID_ADVISOR_GR_GESTIONE, ID_ADVISOR_GR_ISP, COD_ADVISOR, COD_STATO_RISCHIO, DTA_...
CREATE USER 'bafapp' IDENTIFIED BY 'bafapp'; GRANT SELECT ON bafapp.* TO 'bafapp'; GRANT INSERT ON bafapp.* TO 'bafapp'; GRANT UPDATE ON bafapp.* TO 'bafapp'; GRANT DELETE ON bafapp.* TO 'bafapp'; GRANT EXECUTE ON bafapp.* TO 'bafapp'; FLUSH PRIVILEGES;
select distinct subject_id, hadm_id, icustay_id from (select cv.subject_id, cv.hadm_id, cv.icustay_id from `MIMIC3_V1_4.INPUTEVENTS_CV` cv where cv.itemid in (select itemid from `NMB.NMBs` )-- item id for Cisatracurium from carevue and from metavision group by cv.subject_id, cv.hadm_id, cv.icustay_id) union distinc...
DROP DATABASE IF EXISTS moviesDatabase; CREATE DATABASE moviesDatabase; USE moviesDatabase; CREATE TABLE movieTable ( id int(3) NOT NULL AUTO_INCREMENT, title varchar(20), watched BOOLEAN, PRIMARY KEY (id) ); -- 1 = true INSERT INTO movieTable (title, watched) VALUES ('One Piece', true); INSERT INTO movieTabl...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.9 -- Dumped by pg_dump version 9.5.9 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; SET row_security = off; ...
select a.* from ( select t.date, case when t1.studies_created is not null then t1.studies_created else 0 end studies_created, case when t2.public is not null then t2.public else 0 end public_studies, case when t4.review is not null then t4.review else 0 ...
INSERT INTO `ViaPublica` VALUES (1),(2),(3),(4),(5); INSERT INTO `ViaPublica` VALUES (6),(7),(8),(9),(10); INSERT INTO `ViaPublica` VALUES (11),(12),(13),(14),(15); INSERT INTO `ViaPublica` VALUES (16),(17),(18),(19),(20); INSERT INTO `ViaPublica` VALUES (21),(22),(23),(24),(25); INSERT INTO `ViaPublica` VALUES (26),(2...
DROP DATABASE IF EXISTS `films_db`; CREATE DATABASE `films_db`; USE `films_db`; CREATE TABLE `movies` ( `id` INTEGER(11) AUTO_INCREMENT, `title` VARCHAR(255) NOT NULL, `rating` INTEGER(11) NOT NULL, PRIMARY KEY(`id`) );
/*Create a new SQL script named 3.5.3_limit_exercises.sql. MySQL provides a way to return only unique results from our queries with the keyword DISTINCT. For example, to find all the unique titles within the company, we could run the following query: SELECT DISTINCT title FROM titles; List the first 10 distinct last n...
--// materialinitem.sql --// create table 'materialinitem' drop table MaterialInItem; create table MaterialInItem( No int NOT NULL, MNo1 int, MNo2 int, MNo3 int, MNo4 int, MNo5 int, MNo6 int, MNo7 int, MNo8 int, MNo9 int, MNo10 int, primary key(No));
create table Province( ProvID int primary key, ProvName varchar(50), Sort int, Memo varchar(50) ) create table City( CityID int primary key, CityName varchar(200) not null, ProvID int not null, Sort int ) create table Region( RegionID int primary key, RegionName varchar(200) not null, CityID int not null, Sort int )...
/*Créez la procédure stockée Lst_Suppliers correspondant à la requête afficher le nom des fournisseurs pour lesquels une commande a été passée.*/ DELIMITER $$ CREATE DEFINER=`mhirihoueida`@`localhost` PROCEDURE `Lst_Suppliers`() NO SQL SELECT sup_name FROM suppliers,products WHERE products.pro_sup_id= suppliers.su...
update harmony.tuser us set user_type_id = 2 where exists ( select id from harmony.tssc ssc where ssc.legal_entity = us.legal_entity and ssc.mrc = us.mrc ); update harmony.tuser us set SHARED_SERVICE_CENTER_ID = ( select id from harmony.tssc ssc where ssc.legal_entity = us.legal_entity and ssc.mrc = us.mrc ) ...
CREATE TABLE CAR(ID BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,NAME VARCHAR(255),TYPE_ID BIGINT,COLOR VARCHAR(255),PRICE DECIMAL(18, 2),AMOUNT INT); CREATE TABLE CAR_TYPE (ID BIGINT AUTO_INCREMENT NOT NULL PRIMARY KEY,NAME VARCHAR(255) NOT NULL); ALTER TABLE CAR ADD CONSTRAINT CAR_FK FOREIGN KEY (TYPE_ID) REFERENCES ...
exec sp_rename 'Table', 'UserData'
------------------------------------------------------------------------------ -- TEMPORARY WORKING 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 t...
-- phpMyAdmin SQL Dump -- version 4.0.4 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Dec 04, 2015 at 02:11 PM -- Server version: 5.6.12-log -- PHP Version: 5.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
IF NOT EXISTS(SELECT * FROM sys.tables where [name] = 'RecommendedPrices') BEGIN CREATE TABLE [prod].[RecommendedPrices]( [Balance] [money] NOT NULL, [MinPrice] [money] NOT NULL, [MaxPrice] [money] NOT NULL ) ON [PRIMARY] ALTER TABLE [prod].[RecommendedPrices] ADD CONSTRAINT [DF_RecommendedPrices_Balance] D...
 -- Temp Organisation DO $$ Declare DoTemplateID uuid; Declare DoVersionNumber integer; Declare OrganisationTypeID integer; Begin -- declare variables OrganisationTypeID := (select "OrganisationTypeID" from "OrganisationType" where "Name" = 'Supplier' limit 1); INSERT INTO public."DefaultOrganisationTemplate" ( ...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 07 Jul 2019 pada 16.50 -- Versi server: 10.1.38-MariaDB -- Versi PHP: 7.3.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARA...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th4 07, 2019 lúc 07:32 PM -- Phiên bản máy phục vụ: 10.1.37-MariaDB -- Phiên bản PHP: 5.6.40 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*...
insert into matiere(matiere_id, nom_matiere) values(1,'Probabilité appliquées'); insert into matiere values(2,'circuits Numériques'); insert into matiere values(3,'Math de L"ingénieur'); insert into matiere values(4,'Algorithmique et Strucuture de Données etProgrammation C'); insert into matiere values(5,'Economie et G...
select id, kyu, languages, description, starter_code, name, examples, tags, creator from katas WHERE kyu >= $1 AND kyu <= $2;
-- restringindo e ordenando dados -- -- objetivo recuperar e limitar linha recuperadas por uma consulta -- utilizando filtro simples. SELECT * FROM aluno WHERE id >= 10 AND id <= 50; -- utilizando uma função que representa o mesmo resultado. SELECT * FROM aluno WHERE id BETWEEN 10 AND 50; -- caso no projeto anterior...
drop database hospital; create database hospital; use hospital; create table doctors ( `doctor_id` int not null, `doctor_type` varchar(10) not null, `doctor_name` varchar(20) not null, `salary` int not null, CONSTRAINT `PK_doctor_id` PRIMARY KEY (`doctor_id`) ); create table patients( `patient_id` ...
-- +migrate up ALTER TABLE "public"."bingo_plays" DROP COLUMN "player_id"; -- +migrate down ALTER TABLE "public"."bingo_plays" ADD COLUMN "player_id" integer, ADD FOREIGN KEY("player_id") REFERENCES "public"."bingo_players"("id");
/* Navicat MySQL Data Transfer Source Server : 192.168.189.128 Source Server Type : MySQL Source Server Version : 100402 Source Host : 192.168.189.128:3306 Source Schema : dailyfresh Target Server Type : MySQL Target Server Version : 100402 File Encoding : 65001 Date...
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: Sep 11, 2017 at 11:32 AM -- Server version: 5.6.37 -- PHP Version: 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
-- ----------------------------------------------------- -- procedure sp_AuthorizePlayer -- ----------------------------------------------------- delimiter && CREATE PROCEDURE sp_AuthorizePlayer(IN p_username varchar(45) , IN p_password varchar(45)) BEGIN SELECT playerId, userName, firstName, lastName, email...
select * from semantic.alerts where alert = '5000Y00000V0Y3o' select * from semantic.alerts a where a.datetime_opened >= '2016-12-05'::date - interval '60 days' and a.datetime_opened < '2016-12-05' and ST_DWithin('0101000020E6100000AD0782B68B1FB5BFDFB023C44BC34940',a.location, 50)
CREATE TABLE [Master].[Roles] ( [Role] NVARCHAR (50) NOT NULL );
-- complain if script is sourced in psql, rather than via CREATE EXTENSION \echo Use "CREATE EXTENSION pgsodium" to load this file. \quit CREATE FUNCTION randombytes_random() RETURNS integer AS '$libdir/pgsodium', 'pgsodium_randombytes_random' LANGUAGE C VOLATILE; CREATE FUNCTION randombytes_uniform(upper_bound integ...
CREATE DATABASE IF NOT EXISTS edison; USE edison; DROP TABLE IF EXISTS edison.pwm; CREATE TABLE IF NOT EXISTS edison.pwm ( `id` int(11) NOT NULL DEFAULT 0, `pwm1` double(5,2) DEFAULT NULL, `pwm2` double(5,2) DEFAULT NULL, `pwm3` double(5,2) DEFAULT NULL, `pwm4` double(5,2) DEFAULT NULL, `update_...
CREATE DATABASE QuanLyDoanhNghiepDB USE QuanLyDoanhNghiepDB CREATE TABLE LOAISP ( MaLoaiSP NCHAR(4) NOT NULL PRIMARY KEY, TenLoaiSP NVARCHAR(50) NOT NULL ) CREATE TABLE SANPHAM ( MaSP NCHAR(5) NOT NULL PRIMARY KEY, TenSP NVARCHAR(50) NOT NULL, MaLoaiSP NCHAR(4) NOT NULL FOREIGN KEY REFERENCES LOAISP(Ma...
DELETE FROM content_imgs; INSERT INTO content_imgs("elemId", "aspectRatio", "optimalWidth", "optimalHeight") VALUES ('carousel-img-1', 1.777777778, 1600, 900), ('carousel-img-2', 1.777777778, 1600, 900), ('carousel-img-3', 1.777777778, 1600, 900), ('good-img', 2.25, 450, 200), ('contacts-img-1', 1.02, 344, 334); ...
SELECT end_station, AVG(duration) average_duration FROM trips GROUP BY 1 ORDER BY average_duration DESC
create database PLANSAUDE; user PLANSAUDE; create table Cliente (idCliente int primary key auto_increment, nome varchar (50), telefone int (12), cpf int (11) ); create table Dependente ( sexo varchar (1), idade varchar (2) ); create table Endereco ( rua varchar (60), numero int (4), complemento varcha...
create table if not exists movie ( id bigint auto_increment primary key, name varchar(255) not null, year int not null, description text, poster varchar(4096) );
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'; -- ----------------------------------------------------- -- Schema cinesoft -- -------------------------------------...
 CREATE PROCEDURE [ERP].[Usp_Upd_Comparador_GenerarOC] @ID INT AS BEGIN --SET QUERY_GOVERNOR_COST_LIMIT 36000 --SET NOCOUNT ON; UPDATE ERP.Comparador SET FlagGeneroOC = 1 WHERE ID = @ID --SET NOCOUNT OFF; END
 CREATE PROC [ERP].[Usp_Ins_EntidadTipoDocumento] @IdEntidad INT OUT, @IdTipoPersona INT, @IdTipoDocumento INT, @IdCondicionSunat INT, @Nombre VARCHAR(250), @NumeroDocumento VARCHAR(20), @FlagBorrador BIT, @EstadoSunat BIT AS BEGIN INSERT INTO ERP.Entidad(Nombre,IdTipoPersona,EstadoSunat,IdCondicionSunat,Fla...
SELECT DISTINCT T.Email AS Email FROM ( SELECT P1.Email AS Email FROM Person AS P1 INNER JOIN Person AS P2 ON P1.Id <> P2.Id AND P1.Email = P2.Email ) AS T;
SELECT h2.name objectcsid, cc.objectnumber, h1.name mediacsid, mc.description, b.name, mc.creator creatorRefname, mc.creator creator, mc.blobcsid, mc.copyrightstatement, mc.identificationnumber, mc.rightsholder rightsholderRefname, mc.rightsholder rightsholder, mc.contributor FROM media_common mc JOIN misc ON (mc.id...
CREATE INDEX idx_da_city ON public.da_city USING btree (dw_last_updated_dt, dw_facility_cd); CREATE UNIQUE INDEX uk_da_city ON public.da_city USING btree (dw_row_id, dw_facility_cd); CREATE UNIQUE INDEX uk_da_city_2 ON public.da_city USING btree (city_cd, dw_facility_cd);
alter table BATTING_DETAIL drop constraint BATTING_DETAIL_FK1; alter table BATTING_DETAIL drop constraint BATTING_DETAIL_FK2; alter table BATTING_DETAIL drop constraint BATTING_DETAIL_FK3; alter table BATTING_DETAIL drop constraint BATTING_DETAIL_FK4; alter table BATTING_DETAIL drop constraint BATTING_DETAIL_FK5;
-- Se eliminan las tablas actuales de parada y ruta, de forma que se cargue el -- nuevo modelo de paradas ALTER TABLE "PIO".institucion DROP CONSTRAINT "FK_institucion_ruta"; ALTER TABLE "PIO".institucion DROP COLUMN idruta; DROP TABLE "PIO".ruta; DROP TABLE "PIO".parada; DROP SEQUENCE "PIO".parada_id; -- Se crea un...
/** * SQL for Delete FR_SHISETSU_WITHOUT_INS_SRV by SHISETSU_CD * @author TuyenVHA * @version $Id: ShisetsuDashboardService_deleteFrShisetsuWithoutInsSrv_Del_01.sql 21156 2014-08-15 04:15:43Z p__toen $ */ DELETE FROM FR_SHISETSU_WITHOUT_INS_SRV FSWIS WHERE FSWIS.SHISETSU_CD = /*shisetsuCd*/'111111111'
/* ################################################################################ Migration script to create new tables for ethnicity tracking Designed for execution with Flyway database migrations tool; this should be automatically run to completely generate the schema that is out-of-the-box compatibile with the GO...
UPDATE traitor_users SET joined_mission = $2 WHERE traitor_users_id = $1;
CREATE TABLE [ERP].[ListaPrecio] ( [ID] INT IDENTITY (1, 1) NOT NULL, [IdEmpresa] INT NULL, [Nombre] VARCHAR (50) NULL, [IdMoneda] INT NULL, [PorcentajeDescuento] INT NULL, [FechaRegistro] DATETIME...
-- Displays the number of records with id = 89 in -- the table first_table of the current database. SELECT COUNT(*) FROM `first_table` WHERE `id` = 89;
USE Orders -- Problem 16 SELECT ProductName, OrderDate, DATEADD(DAY, 3, OrderDate) AS [Pay Due], DATEADD(MONTH, 1, OrderDate) AS [Deliver Due] FROM Orders -- Problem 17 CREATE TABLE People ( Id int PRIMARY KEY IDENTITY, Name nvarchar(50) NOT NULL, Birthdate date NOT NULL ) INSERT INTO People (Name, Birthdate...
use m2h3; set hive.tez.java.opts=-Xmx1024m; ADD JAR m2h3-assembly-1.jar; CREATE TEMPORARY FUNCTION useragent AS 'module2.homework3.UserAgentUDF'; select d.cityname,c.ua,c.suma from city d, (select a.cityid, a.ua, a.suma from (select i.cityid as cityid, i.ua as ua, sum(i.counter) as suma from (select imp.cityid as...
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; -- **************************************** -- *** Crear basedatos: TiendaRopaRafa *** -- **************************************** CREATE DATABASE IF NOT EXISTS TiendaRopaRafa; USE TiendaRopaRafa; -- ---------...
1. Write a SQL statement that will return the following result: id | author | categories ----+-----------------+-------------------------------- 1 | Charles Dickens | Fiction, Classics 2 | J. K. Rowling | Fiction, Fantasy 3 | Walter Isaacson | Nonfiction, Biography, Physics (3 rows) SELECT...
--@Autor: Berdejo Arvizu Oscar || Olmos Cruz Edwin --@Fecha creación: 25/10/2018 --@Descripción: Creacion de Usuario --Usuario Admin: baoc_proy_admin --Usuario Invitado: baoc_proy_invitado Prompt secuendias de busqueda connect baoc_proy_admin --Muestra estudiantes, tesis y su director de tesis select t.nombre, et.cla...
drop table if exists rides_file_record ; create table rides_file_record( file_name varchar(200), loaded_timestamp timestamp with time zone not null default (now() at time zone 'utc'), -- if you dont specify the load time it will use the current time record_count int ) ;
--regulatory create sequence regulatory_seq start with 1 increment by 1; create table regulatory ( id integer generated by default as sequence regulatory_seq, client_id integer, regulator_id integer, regulation_type varchar(50) ); alter table regulatory add primary key(id); alter table regulatory add constraint...
CREATE TABLE sav_abnormality ( idx integer PRIMARY KEY NOT NULL, pri_key text, stared integer)
alter table retirement add column metadata jsonb; create policy retirement_app_user_select on retirement for select to app_user using (true);
-- +goose Up -- SQL in section 'Up' is executed when this migration is applied create table meeting ( id serial8 PRIMARY KEY, name varchar(100), type varchar(20), created...
CREATE DATABASE instafake; \c instafake; CREATE TABLE Instagram (id SERIAL PRIMARY KEY, username VARCHAR(255), post VARCHAR(255), description VARCHAR(255),hashtags VARCHAR(255));
create database bd_portal; use bd_portal; -- tablas: usuarios, Login, Notas, Materias, -- drop database bd_portal; create table usuario( id int auto_increment primary key, usuario varchar(25), clave varchar(25) ); create table alumno( carnet int primary key not null, nombre varchar(50), carrera varchar(50), ...
SET FOREIGN_KEY_CHECKS = 0; CREATE DATABASE IF NOT EXISTS `shorturl` CHARACTER SET utf8 COLLATE latin1_swedish_ci; USE shorturl; CREATE TABLE IF NOT EXISTS `hits` ( `hit_id` int(11) NOT NULL AUTO_INCREMENT, `link_id` int(11) NOT NULL, `refer` varchar(150) NOT NULL, `user_ip` varchar(16) NOT NULL, `access_t...
-- phpMyAdmin SQL Dump -- version 4.8.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 15, 2018 at 08:31 PM -- Server version: 10.1.34-MariaDB -- PHP Version: 5.6.37 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
/* Navicat MySQL Data Transfer Source Server : UnityMMO Source Server Version : 50640 Source Host : 192.168.5.132:3306 Source Database : UnityMMOGame Target Server Type : MYSQL Target Server Version : 50640 File Encoding : 65001 Date: 2019-08-24 16:33:42 */ SET FOREIGN_KEY_CHECKS=...
CREATE DATABASE containers_db; USE containers_db; CREATE TABLE containers_info (container_id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255), created_at BIGINT, status VARCHAR(255), cpu INT, memory_usage INT ); CREATE TABLE containers_addresses (id INT AUTO_INCREMENT PRIMARY KEY, container_id INT, address VARCHAR(255...
SELECT DNUM AS FOLIO, DREFERELLOS AS REFERENCIA, DPAR0 AS PROVEEDOR, TIDESCR AS TIPO_MOV, IF(CATDESCR='IBUSHAK/MERCADO LIBRE','MERCADO LIBRE', IF(CATDESCR='MERCADO LIBRE TOXIC','MERCADO LIBRE', IF(CATDESCR='MERCADO LIBRE FULL','MERCADO LIBRE', IF(CATDESCR='AMAZON COMER','AMAZON', IF(CATDESCR='AMAZON EN CEDIS',...
-- Inicializa usuario delete from usuario_perfil_empleado where id_usuario_perfil_empleado >=1; delete from empleado where id_empleado >=1; delete from usuario_perfil_empresa_rol where id_empresa_cat_rol >=1; delete from usuario_perfil_empresa where id_usuario_perfil_empresa >=1; delete from usuario_perfil_contador ...
create table races ( id SERIAL PRIMARY KEY, name VARCHAR(50), location VARCHAR(50), date DATE, created_at DATE, updated_at DATE ); insert into races (id, name, location, date, created_at, updated_at) values (1, 'races1', 'China', '6/8/2021', '6/1/2021', '12/2/2020'); insert into races (id, name, location, date, c...
SELECT 'Bilonozhko' student FROM DUAL;
-- This file should undo anything in `up.sql` ALTER TABLE `user_club_relation` DROP `is_visible`;