text
stringlengths
6
9.38M
REM ******************************************************** REM BDD PJS4 REM Auteur : PATRY Mathieu DUGAUQUIER Thibault REM ******************************************************** SET FEEDBACK OFF PROMPT ** CREATION DES TABLES drop table Classe cascade constraint purge; drop table Classifier cascade constraint pur...
DROP TABLE IF EXISTS `sys_dept`; CREATE TABLE `sys_dept` ( `DeptId` bigint(20) NOT NULL, `DeptNo` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `DeptName` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `IsDel` tinyint(4) NOT NULL COMMENT '1未删除 0删除', `R...
SELECT g.id, g.name, gt.name FROM garment AS g JOIN garmenttype AS gt ON gt.id = g.garmenttypeid
use test; CREATE PROCEDURE populate_data() BEGIN DECLARE i int DEFAULT 0; WHILE i <= 80000 DO if (MOD(i,2) >= 0) THEN INSERT INTO users (name, created_at) VALUES (CONCAT('name_', 1), NOW() - INTERVAL 1 MONTH); SET i = i + 1; END IF; if (MOD(i,2) < 0) THEN ...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: May 20, 2015 at 06:31 PM -- Server version: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; ...
set heading on set pagesize 50000 set newpage 0 set termout on set pause off set linesize 250 trimspool on break on name skip page column name new_value pname noprint column type new_value ptype noprint column line format 999999 column text format a200 prompt Source Code Owner: set term off feed off col cowner nop...
CREATE OR REPLACE PROCEDURE sp_wf_transfer_ln ( inFlowID in varchar2, inWorkID in varchar2, inRunUserID in varchar2, inEventName in varchar2, inEventValue in varchar2, inRunTime in date ) IS flowTraceID varchar2(50); flowTraceUserID varchar2(50); flowRunni...
with handshake(round, public_key) as ( select 0, 1 union all select round+1, (public_key * 7) % 20201227 from handshake where round <= 20201228 ) select public_key from (select round from handshake where public_key=8421034 limit 1) as card_loop, (select ...
# --- !Ups create sequence event_log_id; CREATE TABLE event_log( id bigint NOT NULL DEFAULT nextval('event_log_id'), ts timestamp without time zone default (now() at time zone 'utc'), email text, ip text, url text, message text, extra text, primary key(id) ); # --- !Downs drop table event_log; ...
-- This file should undo anything in `up.sql` DROP INDEX IF EXISTS idx_word_entries_orth; DROP INDEX IF EXISTS idx_word_entries_group; DROP TABLE IF EXISTS word_entries; DROP TABLE IF EXISTS word_entry_groups;
CREATE TABLE atdBLike ( seq NUMBER PRIMARY KEY, eseq NUMBER NOT NULL REFERENCES employee(seq), bseq NUMBER NOT NULL REFERENCES atdboard(seq), STATE NUMBER DEFAULT 0 NOT NULL );
CREATE procedure sp_Save_Scheme_Customer_detail (@SCHEMEID INT, @CUSTOMERID nvarchar(255), @ALLOTEDAMT DECIMAL(18,6)) As Insert SchemeCustomers (SchemeID, CustomerID, AllotedAmount) values ...
create table {{table}}_temp (like {{table}}); insert into {{table}}_temp select distinct * from {{table}}; drop table {{table}}; alter table {{table}}_temp rename to {{table}}; alter table {{table}} owner to gha_admin;
DROP KEYSPACE logging; CREATE KEYSPACE logging WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }; USE logging; DROP TABLE logs; CREATE TABLE logs ( key timeuuid PRIMARY KEY, logger_name varchar, log_level varchar, log_timestamp tim...
create table SALES_ORDER_PRODUCT_LINK ( ORDER_ID varchar(36) not null, PRODUCT_ID varchar(36) not null, primary key (ORDER_ID, PRODUCT_ID) );
TIPO B Nombre: <Pon aquí tu nombre> ************************************************************************ INSTRUCCIONES: ============== -Salva este fichero con las iniciales de tu nombre y apellidos, en el directorio "C:\Examen\ ": Ejemplo: José María Rivera Calvete JMRC.txt -Pon tu nombre al ejercicio y ...
SELECT * FROM lh_ds_ask_column ldac where 1=1 <#include "LhDsAskColumnDao_condition.sql">
-- This file should undo anything in `up.sql` DROP TABLE shop; DROP TABLE product; DROP TABLE order; DROP TABLE lineitems;
CREATE DATABASE "WARLOCK" ENCODING "UTF-8"; ALTER database "WARLOCK" SET search_path TO public;
-- phpMyAdmin SQL Dump -- version 4.8.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Sep 25, 2019 at 04:08 PM -- Server version: 10.1.33-MariaDB -- PHP Version: 7.2.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
create or replace procedure proc_tpa_res_warning_v(p_date date) as v_date date; s_error varchar2(4000); v_sql varchar2(4000); begin select trunc(decode(p_date,null,trunc(sysdate-3/24,'hh24'),p_date),'hh24') into v_date from dual; delete from tpa_res_warning where scan_start_time=v_date; v_sql:=' create global tempo...
-- MySQL dump 10.13 Distrib 5.5.13, for Linux (i686) -- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME...
--liquibase formatted sql --changeset author1:1 create table liquibase ( id int primary key, name varchar(255) ); --rollback drop table liquibase; --changeset author1:2 create table liquibase2 ( id int primary key, name varchar(255) ); --rollback drop table liquibase2;
DROP DATABASE IF EXISTS unidad8; CREATE DATABASE IF NOT EXISTS unidad8 CHARACTER SET utf8mb4; USE unidad8; CREATE TABLE centro ( codigo INTEGER PRIMARY KEY, nombre VARCHAR (150) NOT NULL, direccion VARCHAR(200) NOT NULL ); CREATE TABLE departamento ( codigo INTEGER PRIMARY KEY, nombre VARCHAR(150) NOT...
CREATE TABLE `oms_order_shipping` ( `order_id` VARCHAR(50) NOT NULL COMMENT '订单ID', `receiver_name` VARCHAR(20) NULL DEFAULT NULL COMMENT '收货人全名', `receiver_phone` VARCHAR(20) NULL DEFAULT NULL COMMENT '固定电话', `receiver_mobile` VARCHAR(30) NULL DEFAULT NULL COMMENT '移动电话', `receiver_state` VARCHAR(10) NULL DEFAULT...
set hive.execution.engine=spark; drop table if exists dwd.tmp_report_risk_node_info_p1; create table if not exists dwd.tmp_report_risk_node_info_p1 ( `apply_no` string , `PROC_DEF_KEY_` string , `product_version` string COMMENT '版本', `flow_instance_id` string , `f_sc_date` timestamp COMMENT '第一次审查时间', `f_...
-- MySQL Script generated by MySQL Workbench -- 07/07/16 00:15:21 -- 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='TRADITION...
create or replace view v1_MQ_3335_2 as select a.VOUCHERID,a.VOUCHERDETAILID,nvl(a.jsde107,0) IndexId,nvl(zbde151,' ') IndexNo,czde951 ExpSourceCode,decode(a.de011,nvl(czde183,a.de011),1,9) ExpSource,a.QUOTANO,a.EXPFUNCCODE,b.de083 ExpFuncName,a.PROJECTCODE,a.PROJECTNAME, nvl(czde901,0) LimitAmount,a.AMOUNT,a.USE,a.OL...
--ÖÐÔ¶½Å±¾²¹¶¡ alter table FBS_FINANC_PLAN_DETAIL ALTER COLUMN RMK VARCHAR(400);
DROP TABLE burgers_deals; DROP TABLE deals; DROP TABLE burgers; DROP TABLE visits; DROP TABLE eateries; DROP TABLE users; CREATE TABLE users ( id SERIAL8 primary key, name VARCHAR(255) not null ); CREATE TABLE eateries ( id SERIAL8 primary key, name VARCHAR(255) not null, url VARCHAR(255) ); CREATE TABLE ...
create table GECONSUL( sq_consulta number(8), cd_pessoa_Medico number(6) not null, cd_pessoa_paciente number(6) not null, ds_identificacao varchar2(2000), ds_queixa_principal varchar2(2000), ds_historia_doenca_atual varchar2(2000), ds_historia_doenca_progressa varchar2(...
DROP TABLE IF EXISTS `orders`; CREATE TABLE `orders` ( `orderid` int(11) NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL, `length` int(11) NOT NULL, `width` int(11) NOT NULL, `height` int(11) NOT NULL, `sent` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`orderid`), KEY `user_id_idx` (`orderid...
create table agents ( id INTEGER PRIMARY KEY AUTO_INCREMENT, RentalCompany_id INTEGER NOT NULL, agent_name VARCHAR(255) NOT NULL, FOREIGN KEY (RentalCompany_id) references Rental_companies (id) );
/* Navicat MySQL Data Transfer Source Server : guo Source Server Version : 50140 Source Host : localhost:3306 Source Database : mjgz Target Server Type : MYSQL Target Server Version : 50140 File Encoding : 65001 Date: 2016-08-09 21:52:02 */ SET FOREIGN_KEY_CHECKS=0;...
CREATE UNIQUE INDEX unique_social_user_id ON members (social_user_id);
CREATE TABLE IF NOT EXISTS user ( id INTEGER PRIMARY KEY AUTOINCREMENT, name text, email text UNIQUE, password text, CONSTRAINT email_unique UNIQUE (email) ); CREATE TABLE IF NOT EXISTS team ( id INTEGER PRIMARY KEY AUTOINCREMENT, name text UNIQUE, organizer INTEGER, options te...
-- phpMyAdmin SQL Dump -- version 5.0.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 06, 2021 at 10:19 AM -- Server version: 10.4.16-MariaDB -- PHP Version: 7.4.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
-- 统计玩家连续登录的分数,比如 -- player_id event_date -- 1 2016-01-02 -- 1 2016-01-03 -- 1 2016-01-04 -- 1 2016-02-02 -- 2 2016-01-02 -- 3 2016-01-02 -- 3 2016-01-03 -- 总共有3个player_id玩家登录,其中1和3都有连续两天登录,故分数为 1/3 = 0.33 select round ( -- 过滤 -1 的数据集 (select count(*) from ( ...
select `i_item_id`, `i_item_desc`, `i_current_price` from `item` where `i_current_price` between asymmetric 68 and 68 + 30 and `inv_item_sk` = `i_item_sk` and `d_date_sk` = `inv_date_sk` and cast(`d_date` as date) between asymmetric cast('2000-02-01' as date) and cast('2000-02-01' as date) + interval '60' day and `i_ma...
use CareerGuidenceV1; insert into categories(id , name) values (0 , ""), (1, "Склонность к работе с людьми. Профессии, связанные с управлением, обучением, воспитанием, обслуживанием (бытовым, медицинским, справочно-информационным). Людей, успешных в профессиях этой группы, отличает общительность, способность находит...
INSERT INTO `callbacks` (`name`, `atomic`,`category`,`issued`,`user`) VALUES (?,?,?,now(),?);
USE burger_db; INSERT INTO burgers (burger_name, devoured) VALUES ('White Castle Cheeseburger', '0'); INSERT INTO burgers (burger_name, devoured) VALUES ('White Castle Veggie burger', '0'); INSERT INTO burgers (burger_name, devoured) VALUES ('Mc Donalds Big Mac ', '0'); INSERT INTO burgers (burger_name, devoured...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jan 25, 2019 at 01:04 AM -- Server version: 10.1.36-MariaDB -- PHP Version: 7.2.10 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 22, 2020 at 05:18 PM -- Server version: 10.4.6-MariaDB -- PHP Version: 7.1.32 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @O...
CREATE TABLE user ( user_id INT(6) AUTO_INCREMENT NOT NULL, username VARCHAR(30) NOT NULL, password VARCHAR(64) NOT NULL, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(30) NOT NULL, student_id VARCHAR(30) NOT NULL, auth_key VARCHAR(64) NOT NULL, admin TINYINT NOT NULL, CONSTRAINT user_pk PRIMARY ...
-- MySQL dump 10.13 Distrib 8.0.23, for Win64 (x86_64) -- -- Host: localhost Database: CSIS_DB -- ------------------------------------------------------ -- Server version 8.0.23 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Oct 20, 2018 at 07:09 PM -- Server version: 5.7.21 -- PHP Version: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
/* Para deletar/excluir uma tabela inmteira, não digo dados, mas sim a tabela em si, utiliza-se o comando DROP DROP TABLE <nome_tabela> */ DROP TABLE tabela;
CREATE TABLE empresa( idUsuario int NOT NULL, RazonSocial varchar(255) not null, cuit int not null, idCatEmpresa int not null, PRIMARY KEY (idUsuario), FOREIGN KEY (idUsuario) REFERENCES usuario(idUsuario), FOREIGN KEY (idCatEmpresa) REFERENCES categoria_empresa(idCatEmpresa) )
update channels set type = 'group' where type = 'direct'; alter table channels CHANGE type type enum('private', 'public', 'group'); alter table channel_members CHANGE type type enum('owner', 'member', 'invitee');
/* Navicat Premium Data Transfer Source Server : localhost Source Server Type : MySQL Source Server Version : 50626 Source Host : localhost Source Database : deploy Target Server Type : MySQL Target Server Version : 50626 File Encoding : utf-8 Date: 03/27/2018 15:24:07...
 /* Some procedure by me */ --CREATE PROCEDURE dbo.pr_SomeProcedure --AS -- log that this information was retreived INSERT tb_Log VALUES ('name selected', getdate(), SUSER_NAME()) SELECT t.Name ,t.Age FROM tb_Account t WHERE t.Name = 'Person with no Name'
-- ------------------------------------------------------------------------------------ -- Example SQL script to add a new table to a schema -- -- The table is only created if previously it does not exist. -- ------------------------------------------------------------------------------------ delimiter '//' -- Renam...
DROP TABLE member_point_flow IF EXISTS ; CREATE TABLE member_point_flow ( id INTEGER IDENTITY PRIMARY KEY, user_id INTEGER NOT NULL , order_id INTEGER NOT NULL , point INTEGER, create_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP NOT NULL , update_time TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIM...
USE morpheme; CREATE TABLE bricks ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, type TINYINT UNSIGNED NOT NULL, search CHAR(2) NOT NULL, letter CHAR(1) NOT NULL, frequency SMALLINT UNSIGNED NOT NULL, PRIMARY KEY (id) ); CREATE TABLE domains ( id INT UNSIGNED NOT NULL AUTO_INCREMENT, domain VARCHAR(64) NO...
CREATE OR REPLACE PROCEDURE procedimiento_info_equipo IS CURSOR c_info_equipo IS SELECT E.ID_EQUIPO, E.NOMBRE, E.PRESUPUESTO, E.PUNTOS, P.ID_PRESIDENTE, P.NOMBRE AS PRESIDENTE FROM EQUIPO E, PRESIDENTE P WHERE P.EQUIPO_ID_EQUIPO(+) = E.ID_EQUIPO; v_info c_info_equipo%ROWTYPE; v_num_jugadores NUMBER(2); B...
CREATE TABLE YKT_CUR.T_KEYS ( KEYID INTEGER NOT NULL, KEYVALUE VARCHAR(64), SUMMARY VARCHAR(200), PRIMARY KEY (KEYID) ); CREATE TABLE YKT_CUR.T_DEVICEPSAM ( CARDPHYID VARCHAR(10) NOT NULL, OPENDATE VARCHAR(8) NOT NULL, OPENTIME VARCHAR(6) NOT NULL, CLOSEDATE VARCHAR(8), CLOSETIME VARCHAR(6), DEVICENO IN...
# SQL-Front 5.1 (Build 4.16) /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE */; /*!40101 SET SQL_MODE='' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES */; /*!40103 SET SQL_NOTES='ON' */; # Host: 94.138.223.196 Database: admin_nintio # ------------------------------------------------------ # Server version 5.5.50-MariaDB ...
INSERT INTO burgers (name, devoured) VALUES ("Astro Burger", false); INSERT INTO burgers (name, devoured) VALUES ("Astro Cheeseburger", false); INSERT INTO burgers (name, devoured) VALUES ("Mars Chili Burger", false); INSERT INTO burgers (name, devoured) VALUES ("Titan Astro Burger", false); INSERT INTO burgers (na...
-- phpMyAdmin SQL Dump -- version 4.2.11 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 18 Apr 2016 pada 15.22 -- Versi Server: 5.6.21 -- PHP Version: 5.6.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!4...
DROP DATABASE IF EXISTS fitness; CREATE DATABASE fitness; \c fitness; CREATE TABLE locations( id SERIAL PRIMARY KEY, yelp_id VARCHAR UNIQUE, name VARCHAR, alias VARCHAR, img_url VARCHAR, url VARCHAR, rating FLOAT, latitude FLOAT, longitude FLOAT, address1 VARCHAR, address2 ...
DELETE FROM "movie" WHERE movie_id = ?;
CREATE OR REPLACE PUBLIC SYNONYM compensations_pkg FOR orient.compensations_pkg;
CREATE TABLE geocre_data_models ( id serial NOT NULL, sequence integer NOT NULL DEFAULT 1, creator integer NOT NULL, created timestamp without time zone NOT NULL, last_editor integer, last_edited timestamp without time zone, table_name character varying NOT NULL DEFAULT ''::character varying, type small...
CREATE TABLE Students ( StudentID INT PRIMARY KEY IDENTITY, [Name] VARCHAR(50) ) CREATE TABLE Exams ( ExamID INT PRIMARY KEY IDENTITY(101,1), [Name] VARCHAR(50) ) CREATE TABLE StudentsExams ( StudentID INT FOREIGN KEY REFERENCES Students(StudentID), ExamID INT FOREIGN KEY REFERENCES Exams(ExamID) CONSTRAINT PK_Stude...
USE db_alakatos; SELECT nom, prenom FROM fiche_personne WHERE nom LIKE "%-%" OR prenom LIKE "%-%" GROUP BY nom, prenom;
WITH corp_0 as ( select year, merged_id, age, cluster_id from ( select year, merged_id, (2020 - year) as age from gcp_cset_links_v2.corpus_merged where year <= 2020 and /* data starts at 2005 */ year >= 2005 ) c inner join (select article_id, cluster_id from science_map.dc5_cluster_assignment_stable) cl ON c.merged_i...
-- https://school.programmers.co.kr/learn/courses/30/lessons/59044?language=mysql -- # SELECT name, datetime from animal_outs; -- # select * from animal_ins; -- # select * from animal_outs; -- -- # select * from animal_ins -- # where animal_id not in ( -- # select animal_id from animal_out...
/*VALIDAÇÕES TABELA DIM_CUSTOMER*/ /*Número de cartões por cliente */ SELECT CUSTOMER_ACCOUNT_MASK, COUNT(CUSTOMER_CARD_KEY_MASK) NUM_CAR FROM cartaocontinente.dim_customer T1 GROUP BY CUSTOMER_ACCOUNT_MASK ORDER BY COUNT(CUSTOMER_CARD_KEY_MASK) DESC; /*Número de clientes por género*/...
--<ScriptOptions statementTerminator=";"/> DROP SCHEMA "Schema" RESTRICT; CREATE SCHEMA "Schema";
select promotionstrategy.id as promotionstrategyid, promotionstrategy.name as promotionstrategyname, promotiondimension.id as promotiondimensionid, promotiondimension.first ||' '|| promotiondimension.second as promotiondimension from promotiontype inner join promotionstrategy on idpromotionstrategy=promotionstrategy....
/*Select salaries over 65000*/ SELECT person.name, employee.salary FROM person, employee WHERE salary > 65000 AND employee.person_id = person.person_id;
DELIMITER // CREATE PROCEDURE money_action(IN id INT, IN amount DOUBLE) money_action:BEGIN SELECT account.id_account into @accid from account join card on account.id_account = card.id_account where id_card = id; SET @test = row_count(); IF (@test = 0) THEN LEAVE money_action; SELECT "Card...
consts F0532713CEE09A984B2D52D050A58EF0 8CDCC7F96A988CA2432AA812964351F3 3796835EECA2A1024C539A9BC0DAAD01 -- receipt_types 771A20E1595D97694D7905B0A3D70FF9 9088327EC6DB8B544CF127CDCA60BFBA -- CREATE OR ALTER PROCEDURE TASK_SHIFT_REMINDER ( TASK_ID VARCHAR(32), ACCOUNT_ID VARCHAR(32) ) AS DECLARE DRIVER_I...
-- oracle-naming-inconsistencies.sql -- highlight some of the inconsistencies oracle data dictionary column names -- names with underscores vs exact same name without underscores with underscores as ( select distinct column_name u1, replace(column_name,'_','') u2 from dba_tab_columns where owner = 'SYS' and colum...
select name from sys.tables exec sp_MSforeachtable 'Drop table ?'
SET CLIENT_ENCODING TO 'UTF8'; -- Dec 16, 2010 1:51:49 PM COT -- Msg.getMsg: NOT found: Please save changes before closing INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,CreatedBy,EntityType,IsActive,MsgText,MsgType,Updated,UpdatedBy,Value) VALUES (0,53126,0,TO_TIMESTAMP('2010-12-16 13:51:48'...
-- phpMyAdmin SQL Dump -- version 4.5.4.1deb2ubuntu2 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Generation Time: 2017-09-17 16:19:02 -- 服务器版本: 5.7.17-0ubuntu0.16.04.1 -- PHP Version: 7.0.13-0ubuntu0.16.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
SELECT * FROM ESUS_MOTIVO_VISITA; INSERT INTO ESUS_MOTIVO_VISITA (COD_MOTIVO_VISITA, DESCRICAO, COD_TIPO_MV) VALUES (1, 'CADASTRAMENTO / ATUALIZAÇÃO', 1); INSERT INTO ESUS_MOTIVO_VISITA (COD_MOTIVO_VISITA, DESCRICAO, COD_TIPO_MV) VALUES (2, 'VISITA PERIÓDICA', 1); INSERT INTO ESUS_MOTIVO_VISITA (COD_MOTIVO_VISITA, D...
--JOINS: --1)INNER JOIN 2)LEFT JOIN 3)RIGHT JOIN 4)FULL JOIN 5)SELF JOIN ​DROP TABLE COMPANIES; CREATE TABLE my_companies ( company_id number(9), company_name varchar2(20) ); ​ INSERT INTO my_companies VALUES(100, 'IBM'); INSERT INTO my_companies VALUES(101, 'GOOGLE'); INSERT INTO my_comp...
CREATE DATABASE seidb; CREATE USER 'seiuser'@'localhost' IDENTIFIED BY 'r1o2o3t4`'; USE seidb; GRANT ALL ON seidb.* TO 'seiuser'@'localhost'; CREATE TABLE sensorData( id INT NOT NULL AUTO_INCREMENT, sensorID TEXT NOT NULL, data TEXT NOT NULL, timestamp TEXT, PRIMARY KEY ( id ); SHOW DATABASES;
USE Concurrency; SELECT * FROM [hlthchk].[WhoIsActive]; SELECT * FROM [hlthchk].[ConnectionCounts]; SELECT * FROM [hlthchk].[AgentJobs]; SELECT * FROM [hlthchk].[Backups]; SELECT * FROM [hlthchk].[BufferPoolSize]; SELECT * FROM [hlthchk].[CacheSize]; SELECT * FROM [hlthchk].[DatabaseInfo]; SELECT * FROM [hlthchk].[Dbc...
-- compléter l'entête -- ================== -- NOM : Wijesinghe -- Prénom : Dinuk -- NOM : -- Prénom : -- Groupe : -- binome : -- ================================================ set sqlbl on -- nettoyer le compte @vider -- Définition des types de données prompt essai create type T_un_type as object ( ...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 03-10-2018 a las 01:50:29 -- Versión del servidor: 10.1.35-MariaDB -- Versión de PHP: 7.2.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
INSERT INTO sys_user (username, nickname, password, salt, phone, gender, head, remark, state, role_id, deleted, create_time, update_time) VALUES ('admin', '管理员', '123', '666', '', 1, 'http://localhost:8888//resource/201910281559227.jpg', 'Administrator Account', 1, 1, 0, '2019-08-26 00:52:...
/* phpBB2 PostgreSQL DB schema - phpBB group 2001 $Id: postgres_schema.sql 5549 2006-02-12 16:14:58Z grahamje $ */ CREATE SEQUENCE phpbb_banlist_id_seq start 1 increment 1 maxvalue 2147483647 minvalue 1 cache 1; CREATE SEQUENCE phpbb_categories_id_seq start 2 increment 1 maxvalue 2147483647 minvalue 1 cache 1; CRE...
### Schema CREATE DATABASE bucket_db; USE bucket_db; CREATE TABLE bucket_list ( id int NOT NULL AUTO_INCREMENT, name varchar(255) NOT NULL, done BOOLEAN DEFAULT false, PRIMARY KEY (id) );
/* MYSQL DATA TYPES */ /* ****** MYSQL NUMERIC DATA TYPES ****** */ /* The following table shows the summary of numberic types in MySQL: TINYINT - A very small integer SMALLINT - A small integer MEDIUMINT - A medium-sized integer INT - A standard integer BIGINT - A large integer DECIMAL - A fixed-point ...
######################################## # MySQL Crash Course # http://www.forta.com/books/0672327120/ # Example table creation scripts ######################################## ############################### # Create `crashcourse` database ############################### CREATE DATABASE IF NOT EXISTS `crashc...
select tp.typeName, b.wasteFactor, b.maxProductionLimit, b.techLevel, (select t1.typeName from invMetaGroups mg, invMetaTypes mt, invBlueprintTypes b1, invTypes t1 where mt.typeID = tp.typeID and mt.parentTypeID = b1.productTypeID and b1.productTypeID = t1.typeID...
/* Admin can do everything in EshopDB */ CREATE USER 'Admin'@'localhost' IDENTIFIED BY 'Admin'; GRANT ALL PRIVILEGES ON EshopDB.* TO 'Admin'@'localhost'; /* Employee can: search for users ( only Customers ) see details about users ( only Customers ) search for products search for orders change the stat...
CREATE SCHEMA `crawler` DEFAULT CHARACTER SET utf8 ; USE `crawler`; CREATE TABLE `crawler`.`user` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `username` VARCHAR(45) NULL, `first_name` VARCHAR(45) NULL, `last_name` VARCHAR(45) NULL, `salt` CHAR(8) NULL, `password` CHAR(60) NULL, `active` TINYINT(1) UNSI...
# # Table structure for table 'tx_transfermietwagen_domain_model_buchung' # CREATE TABLE tx_transfermietwagen_domain_model_buchung ( id_user int(11) DEFAULT '0' NOT NULL, id_fahrer int(11) DEFAULT '0' NOT NULL, name varchar(255) DEFAULT '' NOT NULL, name_kunde varchar(255) DEFAULT '' NOT NULL, telefon varchar(255...
SELECT * FROM Employees as em WHERE ( em.Salary = 25000 OR em.Salary = 14000 OR em.Salary = 12500 OR em.Salary = 26000 );
-- phpMyAdmin SQL Dump -- version 4.2.12deb2+deb8u1build0.15.04.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jun 06, 2016 at 09:02 PM -- Server version: 5.6.28-0ubuntu0.15.04.1 -- PHP Version: 5.6.4-4ubuntu6.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET ...
alter table person drop column if exists password;
CREATE TABLE LOCATION( Location_ID INT NOT NULL, Street_address VARCHAR(30) NOT NULL, City VARCHAR(20) NOT NULL, State CHAR(2) NOT NULL, Zip_code CHAR(5) NOT NULL, PRIMARY KEY(Location_ID)); CREATE TABLE TRIP( Trip_ID INT NOT NULL, Start_date DATE NOT NULL, Start_time TIME(0) NOT NULL, End_date ...
--- --- Copyright 2012 Johns Hopkins University --- --- Licensed under the Apache License, Version 2.0 (the "License"); --- you may not use this file except in compliance with the License. --- You may obtain a copy of the License at --- --- http://www.apache.org/licenses/LICENSE-2.0 --- --- Unless required by appli...
CREATE PROCEDURE sp_close_so(@SONumber int) AS IF (SELECT SUM(Pending) from SODetail WHERE SONumber = @SONumber) = 0 BEGIN UPDATE SOAbstract SET Status = Status | 128 WHERE SONumber = @SONumber END
use health_insurance_claims_database; Use health_insurance_claims_database; select m.member_first_name, m.member_last_name, s.claim_status, p.provider_first_name, p.provider_last_name, p.network, p.practice_name, cp.billed_amount, cp.approved_amount, cp.net_payment from ((((member m inner join claim c ...