text
stringlengths
6
9.38M
-- add conncetion to database USE IO_analytics; -- check connection success SELECT * FROM users; -- Trigger for Final Project -- Application: Executes when data has been updated. -- Trigger function will keep a log when user adjusts their review for a trip, this will help keep track of how users feel about a trip a...
INSERT INTO users (username, email, password_digest, firstname, lastname) VALUES ('user', 'user@hotmail.com', '', 'username','' );
-- phpMyAdmin SQL Dump -- version 4.4.15.5 -- http://www.phpmyadmin.net -- -- Host: localhost:3306 -- Generation Time: 2016 年 10 朁E21 日 11:22 -- サーバのバージョン: 5.5.49-log -- PHP Version: 7.0.6 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT ...
# Author: Ramji Kanaujia select * from city where countrycode="JPN";
-- TODO: Agregar una columna llamada descripción, para el rol insert into mnt.roles(name) values('mnt_user'); insert into mnt.roles(name) values('mnt_administrator'); insert into mnt.users(user_name, email, password, full_name, job_title, is_enabled) values('admin', 'jach@outlook.com', 'Administrador', 'Administrador...
ALTER TABLE event_type ADD COLUMN description CHARACTER VARYING; -- ALTER TABLE event_type DROP INDEX "PK_event_type_id"; ALTER TABLE event_type RENAME COLUMN id TO oldId; alter table endpoint_targets drop CONSTRAINT "FK_event_type_id_target" ; alter table endpoint_targets rename column event_type_id TO eti; -- out...
SELECT 'Hello'; SELECT 'This is so cool!';
/* * House statistics from time series (temperature, humidity, power etc.) */ DELIMITER // DROP PROCEDURE IF EXISTS SP_GET_STATISTICS; CREATE PROCEDURE SP_GET_STATISTICS() BEGIN -- 1 hour ---- temperature SELECT 1 AS PERIOD, MAX(external) AS MAX_EXT, MIN(external) AS MIN_EXT, FORMAT(AVG(external), 2) AS ...
--基本語法 -- 起始交易 BEGIN { TRAN | TRANSACTION } [ { transaction_name | @tran_name_variable } [ WITH MARK [ '文字描述' ] ] ] [ ; ] -- 提交交易 COMMIT [ { TRAN | TRANSACTION } [ transaction_name | @tran_name_variable ] ] [ ; ] -- 回復交易 R...
--授权root远程登录权限,慎用 grant all on *.* to 'root'@'%'; --登录 在控制台中 mysql -h主机名 -uroot -proot
/* STORED PROCEDURES SET STATISTICS TIME ON exec OrdersByTrimester 2017 SET STATISTICS TIME ON exec SoldBooksBetweenDates '2000-01-01', '2010-01-01' SET STATISTICS TIME ON exec UpdateOrder '2000001' SET STATISTICS TIME ON exec SoldBooksByCategory '2000-01-01', '2010-01-01' SET STATISTICS TIME ON exec SoldBooksByGe...
CREATE TABLE IF NOT EXISTS `bugzilla_cache` ( `id` integer(40) NOT NULL AUTO_INCREMENT, `key` varchar(255) NOT NULL DEFAULT '', `fetched_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `data` longtext, `expires` integer(11) NOT NULL DEFAULT 0, PRIMARY KEY (`id`) ) ENGINE=InnoDB, DEFAULT CHARSET...
CREATE OR REPLACE VIEW NODE_TYPE AS SELECT 'HIDRANT' id, 'HYDRANT' type, 'JUNCTION' epa_default, 'man_hydrant' man_table, 'inp_junction' epa_table, 'true' active, 'true' code_autofill, 2 num_arcs, 'false' choose_hemisphere, 'Hidrant' descript, null link_path FROM DUAL ...
-- 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='ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTI...
DROP VIEW IF EXISTS UniCampaignFullView; CREATE VIEW UniCampaignFullView AS SELECT uc.*, CAST(uc.bit_flags AS UNSIGNED) bit_flags_int, ucmf.url shop_feed_url, ucmf.format shop_feed_format, ucmf.checksum shop_feed_checksum, ucmf.created_at ...
create table cells ( cellId int8 not null, planId int8, runwayId int8, stageId int8, primary key (cellId) ); create table checkpoints ( checkpointId int8 not null, strDescription varchar(255), cellId int8, primary key (checkpointId) ...
--// Added Story Image to Image Table -- Migration SQL that makes the change goes here. alter table Image add column storyUrl varchar(255) null, add column storyWidth int not null default 0, add column storyHeight int not null default 0; --//@UNDO -- SQL to undo the change goes here. alter table Image ...
CREATE TABLE tb_member ( `idx` int unsigned auto_increment, `email` varchar(40) not null, `level` tinyint(3) unsigned not null, primary key(`idx`) ); CREATE TABLE tb_report_medic ( `idx` int unsigned auto_increment, `isChildTreat` varchar(255) default '0', `isGrowth` varchar(255) default '0', `isDel...
CREATE DATABASE IF NOT EXISTS `library` /*!40100 DEFAULT CHARACTER SET utf8 */; USE `library`; -- MySQL dump 10.13 Distrib 5.7.12, for Win64 (x86_64) -- -- Host: localhost Database: library -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 SET @OLD_CHARACTER_SET_CLIEN...
/* Formatted on 21/07/2014 18:38:53 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCREB_SRC_ATM ( COD_SRC, ID_DPER, DTA_COMPETENZA, COD_STATO_RISCHIO, DTA_INIZIO_STATO, DTA_FINE_STATO, COD_ABI, COD_NDG, COD_CLI_GE, COD_SNDG, COD_GRUPPO_ECONOMICO, COD_FILIALE, ...
drop table if exists `user_role`; drop table if exists `user_login`; drop table if exists `user`; drop table if exists `address`; drop table if exists `project_allocation`; drop table if exists `project`; drop table if exists `client`; drop table if exists `employee_role`; drop table if exists `employee`; create TABLE...
-- Add a second geom column so that we can convert the original one to the 900913 SRS alter table carinthia_streets add column geom2 geometry(LineString,900913); -- Convert the geom update carinthia_streets set geom2 = ST_Transform(ST_LineMerge(geom), 900913); -- Create the "carinthia_streets_uncovered" table CREATE ...
select * from vnd.elo_agendamento where cd_week = 'W182018' and cd_polo in( 'P003', 'P004') select * from vnd.elo_agendamento where cd_elo_agendamento in (45, 24) cd_week = 'W192018' and cd_polo in( 'P013') AND CD_CENTRO_EXPEDIDOR = '6240' SELECT * FROM CTF.POLO select * from ctf.polo_centro_expedidor where cd_p...
#文件名称:mysql5 #文件描述:练习 #编译环境:Linux #作者相关:心文花雨 #create database mysql5test; #use mysql5test; #create table tt1(id int, name varchar(10), password varchar(15)); #insert into tt1 values (1,"caihao","vdvsj"); #select *from tt1; #create table tt3(); #desc tt3; #select * from tt3; #create table stu (id int, name varchar(30)...
CREATE DATABASE Hotel CREATE TABLE Employees( Id INT PRIMARY KEY IDENTITY, FirstName NVARCHAR(50) NOT NULL, LastName NVARCHAR(50) NOT NULL, Title NVARCHAR(50) NOT NULL, Notes NVARCHAR(MAX) ) INSERT INTO Employees(FirstName,LastName,Title,Notes) VALUES ('Gosho','Goshev','Director',NULL), ('Mariq','Mariikova','Cleaning...
create database bugReports; use bugReports; create table Users ( email varchar(50) not null primary key, username varchar(16) not null, password char(32) not null ); create table Bugs ( bugID int unsigned not null auto_increment primary key, email varchar(50) not null, project varchar(30) not null...
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64) -- -- Host: scc-dev-mysql.mysql.database.azure.com Database: apps -- ------------------------------------------------------ -- Server version 5.6.39.0 /*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS =...
/** * SQL to check exist record in table BY_SHISETSU_COOP_HOSPITAL * @author QuocHN * @version $Id: CareMedicalService_getPreviewShisetsuCoopHospital_Sel_01.sql 23596 2014-08-27 10:04:01Z p_hoan_kuokku $ */ SELECT BSCH.SHISETSU_COOP_HOSPITAL_NAME, BSCH.COOP_METHOD_KBN, BSCH.TRAFFIC_FROM_SHISETSU, BSCH....
-- -- Migration file: "initial structure" created at 01.08.2014 20:50:58 (+06:00) -- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; /*!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...
@@PackageUtility\p_Constant.pck @@PackageUtility\FMCP_FUNCTIONS.pck
drop database ggdata; create database if not exists ggdata; use ggdata; -- tabela aonde vão ser guardado os dados do usuario create table usuario( idUsuario int not null auto_increment, nome varchar(20) not null, email varchar(20) not null, moeda int not null, -- moeda do sistema senha varchar(20) not null, tipo int...
INSERT INTO courses( id, course_code, course_name, course_description ) values ("4e3c00e1-b934-11e9-816f-54ee75c3998a","TR2483","network engineering","<description>"), ("81ff290e-b98f-11e9-816f-54ee75c3998a","TR2482","Computer engineering.","<description>"), ("b537ed5e-b9ad-11e9-816f-54ee75c3998a","TR24...
USE `bankcentric`; # banks DROP TRIGGER IF EXISTS `banks_after_insert`; DELIMITER $$ CREATE DEFINER =`root`@`localhost` TRIGGER banks_after_insert AFTER INSERT ON banks FOR EACH ROW BEGIN INSERT INTO audit_log VALUES (DEFAULT, 'banks', NEW.bank_id, NEW.bank_details, 'I...
-- MySQL dump 10.13 Distrib 5.1.61, for redhat-linux-gnu (x86_64) -- -- Host: localhost Database: MAILUPDATES_RIPE -- ------------------------------------------------------ -- Server version 5.1.61-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARA...
-- create table batch create table testonly.test ( column_1 int null );
insert into user values(10000, sysdate(), 'Tom'); insert into user values(10001, sysdate(), 'Jack'); insert into user values(10002, sysdate(), 'Monica'); insert into post values(11000, 'my first comment', 10000); insert into post values(11001, 'my second comment', 10000); insert into post values(11002, 'my first post'...
--Exercise 13 /*Provide a query that includes the purchased track name AND artist name with each invoice line item.*/ select InvoiceLine.InvoiceLineId 'Line ID', Track.Name 'Track Name', Artist.Name 'Artist Name' from InvoiceLine, Track, Album, Artist where Track.TrackId = InvoiceLine.TrackId and Track.AlbumId = Album...
--ex1: Dans la table frameworks, afficher toutes les données de la table ayant une version 2.x (x étant un numéro quelconque). SELECT * FROM webDevelopment.frameworks WHERE version LIKE '2.%'; --ex2: Dans la table frameworks, afficher toutes les lignes ayant pour id 1 et 3. SELECT * FROM webDevelopment.frameworks WHER...
DELETE FROM `[#DB_PREFIX#]system_setting` WHERE `varname` = 'wecenter_access_token'; DELETE FROM `[#DB_PREFIX#]system_setting` WHERE `varname` = 'wecenter_access_secret'; DELETE FROM `[#DB_PREFIX#]system_setting` WHERE `varname` = 'wecenter_mp_notification_once'; ALTER TABLE `[#DB_PREFIX#]weixin_accounts` DROP COL...
BEGIN TRANSACTION; CREATE TABLE users( id serial primary key, username text unique not null, name text, color text, pet text, entries bigint default 0, joined timestamp not null ); COMMIT;
/* ##################INSTRUCTIONS TO ENABLE QUERY TO RUN ON DISCOVERY DATABASE ############################## * *Because the Mode Public Warehouse runs on a postgreSQL database, we need to make a few changes to the syntax so the query can successfully run on the Discovery Database, *which is provided through Snowflake....
insert into tab_veiculo (codigo, fabricante, modelo, ano_fabricacao, ano_modelo, valor) values (1, 'Fiat', 'Toro', 2020, 2020, 107000); insert into tab_veiculo (codigo, fabricante, modelo, ano_fabricacao, ano_modelo, valor) values (2, 'Ford', 'Fiesta', 2019, 2019, 42000); insert into tab_veiculo (codigo, fabricante, mo...
CREATE OR REPLACE VIEW vw_documents AS SELECT a.id as document_id, a.document_file, a.description, a.document_type, a.document_name, a.ip_address, a.status as document_status, a.created_at, a.updated_at, b.name as addedby_user_name, c.name as modifiedby_user_name FROM do...
create schema class_local_db; use class_local_db; Create table contact( id int not null auto_increment, email varchar(100), primary key(id) ); create table name( id int not null auto_increment primary key, first varchar(50), middle varchar(50), last varchar(50), contact_id int, foreign key(contact_id) references ...
SELECT c.[CustomerID],soh.SalesOrderID FROM Sales.Customer c JOIN [Sales].[SalesOrderHeader] soh ON c.customerID = soh.CustomerID SELECT c.[CustomerID],soh.SalesOrderID FROM Sales.Customer c JOIN [Sales].[SalesOrderHeader] soh ON c.customerID = soh.CustomerID FOR XML RAW SELECT c.[CustomerID],soh.SalesOrderID FROM Sa...
# Facebook Question return the total no. of comments received for each user in the last 30 days. assume today is 2020-02-10 -- filter comments by date -- sum no. of comments -- group by user_id select user_id, sum(on_comments) from fb_comments_count where created_at between ('2020-02-10' :: date - 30 * interval '1 day...
# ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: 127.0.0.1 (MySQL 5.7.26) # Database: lightspeed_test # Generation Time: 2020-07-06 12:22:41 +0000 # ***************************************...
-- ----------------------------------------------------- -- Table `card_info`.`idempotent_control` -- ----------------------------------------------------- CREATE TABLE IF NOT EXISTS `idempotent_control` ( `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, `instruction_id` BIGINT(20) UNSIGNED NOT NULL, `pay_channe...
/* Nebyou Wondimu Assignment Chapter 7 */ SELECT DISTINCT category_name FROM categories WHERE category_id IN (SELECT category_id FROM products); /* Question 2 */ SELECT product_name, list_price FROM products WHERE list_price > (SELECT AVG(lis...
create table users(emaiul varchar(50) primary key)
CREATE USER ideate with PASSWORD 'ideate'; CREATE DATABASE ideate OWNER ideate; create table UserConnection (userId text not null, providerId text not null, providerUserId text, rank int not null, displayName text, profileUrl varchar(512), imageUrl varchar(512), accessToken text not null, ...
DROP TABLE IF EXISTS pancake; DROP TABLE IF EXISTS users;
INSERT INTO licence VALUES ('001', '1-A', 'North sea', 'ACTIVE', '1965-09-01', '2030-03-01', 2145.855000, '100.779', 'PRODUCTION EXTENDED', 20756, 'http://factpages.npd.no/FactPages/default.aspx?nav1=licence'+'@'+'nav2=PageView|All'+'@'+'nav3=20756', 'http://www.npd.no/FactMapSearch?NPDID_production_licence=...
SELECT TOP /*$topRow*/ -- A.物件番号 A.SUPPLIES_NO AS SUPPLIES_NO, -- A.物件名 A.SUPPLIES_NAME AS SUPPLIES_NAME, -- A.製造者名 A.MANUFACTURE_NAME AS MAKER, -- A.物件状況 A.SUPPLIES_CONDITION AS SUPPLIES_CONDITION, -- A.物件予約状況 A.SUPPLIES_RESERVATION_CONDITION AS SUPPLIES_RESERVATION_COND, -- A.処置日 A.SUPPLIES_DISPOSAL_DAT...
SELECT database_name, name, backup_start_date, backup_finish_date, datediff(mi, backup_start_date, backup_finish_date) [tempo (min)], position, first_lsn, last_lsn, server_name, recovery_model, isnull(logical_device_name, ' ') logical_device_name, device_type, type, cast(backup_size/1024/1024 as numeric(15,2)) [Tamanho...
-------------------------------------------------------- -- DDL for Table LND_SALES_PROFESSIONAL -------------------------------------------------------- CREATE TABLE "VF_SPMC_LANDING"."LND_SALES_PROFESSIONAL" ( "EMAIL" VARCHAR2(200), "GRADE" VARCHAR2(50), "NAME" VARCHAR2(256), "ALIAS_ACC_NAME" VARCHAR...
--Тестовый метод CREATE OR REPLACE PROCEDURE xmlweb.SQUARE ( parm IN OUT NUMBER) AS BEGIN parm := parm * 2; END; declare url varchar2 (1000); BEGIN url := 'http://XMLWEB:xmlweb@desktop-jluqgv0:' || dbms_xdb.getHttpPort() || '/orawsv/XMLWEB/SQUARE?wsdl'; dbms_output.put_line (url); END; -- Тест SELECT httpuritype( 'ht...
PARAMETERS [@DocumentoAnticipoID] Text (255); SELECT A.DocumentoID, Format(A.Total,"#,##0.00;(#,##0.00)") AS Neto, Format(A.IGV,"#,##0.00;(#,##0.00)") AS IGV, Format(A.Total-iif(isnull(B.Asignado),0,B.Asignado),"#,##0.00;(#,##0.00)") AS Saldo, iif(A.IGV>0,"1","0") AS CheckIGV, A.IGV...
select unique level1,level2,level1_sortid,level2_sortid from sponsor_hierarchy where hierarchy_name = 'REPORTING' order by 1,2; update sponsor_hierarchy set level1_sortid = null, level2_sortid = null where hierarchy_name = 'REPORTING';
/* 查詢各學生的年齡 */ /* SYSDATETIME() / getdate() 都可以得到目前時間 */ SELECT s_id, s_name, YEAR(getdate())-YEAR(s_birth) AS [Age] FROM student
CREATE SCHEMA IF NOT EXISTS `SAMPLE`; USE `SAMPLE`; CREATE TABLE IF NOT EXISTS `Country` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(40), PRIMARY KEY (`id`)) ENGINE = InnoDB; TRUNCATE TABLE `Country`; INSERT INTO `Country` (id, name) VALUES(1,'Brazil'); INSERT INTO `Country` (id, name) VALUES(2,'...
create database teste; CREATE TABLE `teste`.`usuarios` ( `id` INT NOT NULL AUTO_INCREMENT, `email` VARCHAR(100) NOT NULL, `senha` VARCHAR(45) NOT NULL, `confsenha` VARCHAR(45) NOT NULL, `nome` VARCHAR(45) NOT NULL, PRIMARY KEY (`id`));
create table payment_methods ( id bigint not null auto_increment, name character varying(100) not null, method_name character varying(100) unique not null, max_deposit_amount bigint not null, allowed_countries character varying(300...
-- phpMyAdmin SQL Dump -- version 3.4.10.1 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le : Jeu 07 Juin 2012 à 11:17 -- Version du serveur: 5.5.20 -- Version de PHP: 5.3.10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; -- -- Base de données: `intranet` -- -- ---------------------...
SELECT * FROM Cinema WHERE description <> "boring" and id MOD 2 = 1 ORDER BY rating DESC;
CREATE TABLE shorted_url( id INTEGER PRIMARY KEY AUTOINCREMENT, url TEXT, code TEXT UNIQUE );
CREATE TABLE `tasks` ( `script` VARCHAR(255) NOT NULL, `sync_interval_minutes` BIGINT(20) UNSIGNED NOT NULL, `executed_at` DATETIME NULL DEFAULT NULL, PRIMARY KEY (`script`) ) ENGINE = InnoDB;
-- description: <the Current_Price of an item must always match the Amount of the most recent bid for that item> PRAGMA foreign_keys = ON; drop trigger if exists trigger1; create trigger trigger1 after insert on Bids begin update Item set Currently = new.Amount where Item_ID = new.Item_ID; end;
CREATE TABLE IF NOT EXISTS `run_tbl1`( `id` INT UNSIGNED AUTO_INCREMENT, `title` VARCHAR(100) NOT NULL, PRIMARY KEY ( `id` ) )ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `runoob_tbl`( `runoob_id` INT UNSIGNED AUTO_INCREMENT, `runoob_title` VARCHAR(100) NOT NUL...
/* SQLyog Ultimate v12.09 (64 bit) MySQL - 5.5.22 : Database - resturant ********************************************************************* */ /*!40101 SET NAMES utf8 */; /*!40101 SET SQL_MODE=''*/; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHEC...
-- MySQL dump 10.13 Distrib 5.6.21, for osx10.8 (x86_64) -- -- Host: localhost Database: test -- ------------------------------------------------------ -- Server version 5.6.21 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!4...
create or replace package app_meta_data /** * Project: app_util<br/> * Description: This package is used to config global config as default, * which is able to be overrided by custom package. * @author Vinhpt * @headcom */ as /* * Global attributes */ /** <code>[config]</code><br/> * Config setting fo...
SELECT COUNT(assistance_requests.*) AS total_assistances, name FROM students INNER JOIN assistance_requests ON student_id=students.id WHERE name='Elliot Dickinson' GROUP BY name;
insert into hotels values (87845,'Ashoka',8.9,'Nice food',4500,2,'Bangalore','43-7347830'); insert into hotels values (15142,'Taj',9.4,'Shows Indian culture',6000,3,'mumbai','59-9023249'); insert into hotels values (78578,'The Deluxe',8.8,'Food could be better','4000',2,'surat','51-0014482'); insert into hotels valu...
SELECT F1.CASE_ID, -- 案件ID F1.CASE_NUMBER, -- 案件号 F1.CASE_NO, -- 业务类型 F1.BRANCH_CODE, -- 据点代码 F1.CUSTOMER_CODE, -- 交易方代码 F1.CUSTOMER_NAME, -- 交易方名称 F1.LIMIT_EXPIRY, ...
-- MySQL dump 10.13 Distrib 8.0.21, for Win64 (x86_64) -- -- Host: cs.cqwkirpcobml.ap-northeast-2.rds.amazonaws.com Database: csdb -- ------------------------------------------------------ -- Server version 5.7.26-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET...
DELETE FROM `acore_string` WHERE `entry` IN (30087, 30088, 30089, 30090, 30091, 30092); INSERT INTO `acore_string` (`entry`, `content_default`, `locale_koKR`, `locale_frFR`, `locale_deDE`, `locale_zhCN`, `locale_zhTW`, `locale_esES`, `locale_esMX`, `locale_ruRU`) VALUES ( 30087, '|cffffff00[|cffff0000ANTICHEAT ...
--Crear nuevo usuario(esquema) con el password "PASSWORD" CREATE USER DB_FLIPBOARD IDENTIFIED BY "oracle" DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP; --asignar cuota ilimitada al tablespace por defecto ALTER USER DB_FLIPBOARD QUOTA UNLIMITED ON USERS; --Asignar privilegios basicos GRANT create session...
SELECT [Año-Semana], min(Fecha) as FechaInicio, max(Fecha) as FechaFin FROM TB_Fecha group by [Año-Semana] order by 1 asc
ALTER TABLE VND.TIPO_ORDEM ADD (IC_EXPORT CHAR(1 Byte));
-- phpMyAdmin SQL Dump -- version 4.7.3 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: 31-Jul-2017 às 00:52 -- Versão do servidor: 10.1.23-MariaDB -- PHP Version: 7.1.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
CREATE PROC ERP.Usp_Sel_Nombre_PlanCuenta @IdEmpresa INT AS BEGIN SELECT ID, CuentaContable FROM ERP.PlanCuenta WHERE IdEmpresa = @IdEmpresa END
 CREATE PROC [ERP].[Usp_Sel_OrdenServicioReferencia_By_OrdenServicio] @IdOrdenServicio INT AS BEGIN SELECT CR.ID IdComprobante, CR.IdReferenciaOrigen, CR.IdReferencia, TC.Nombre NombreTipoComprobante, CR.IdTipoComprobante, CR.Serie, CR.Documento, CR.FlagInterno FROM ERP.OrdenServ...
create table users( id serial primary key, user_first varchar(50), user_last varchar(50), user_email varchar(150) not null, user_hash text not null, user_phone varchar(13), admin BOOLEAN ); create table appointment( id serial primary key, appt_date date, appt_start time, appt_end time, appt_price decimal(8,2), appt_p...
INSERT INTO burgers (name, devoured) VALUES ("Hot N Spicy", true); INSERT INTO burgers (name, devoured) VALUES ("Cool Tomato", false); INSERT INTO burgers (name, devoured) VALUES ("Jacks Back", true);
CREATE TABLE CATEGORIES( CATEGORY_ID NUMBER, CONSTRAINT CATEGORIES_PK PRIMARY KEY (CATEGORY_ID), CATEGORY_NAME NVARCHAR2(50), DESCRIPTION NVARCHAR2(200), PICTURE NVARCHAR2(100) );
UPDATE CONFLICT_CONFIG --アクション排他設定テーブル SET --アクション排他設定テーブル.セッションID SESSIONID = NULL, --アクション排他設定テーブル.非同期フラグ SYNCFLG = NULL WHERE --アクション排他設定テーブル.セッションID SESSIONID = /*sessionId*/ --アクション排他設定テーブル.非同期フラグ=引数.非同期フラグ AND SYNCFLG = CAST(/*syncFlg*/ AS CHAR(1))
DROP TABLE IF EXISTS weathers; DROP TABLE IF EXISTS events; DROP TABLE IF EXISTS movies; DROP TABLE IF EXISTS restaurants; DROP TABLE IF EXISTS locations; CREATE TABLE locations ( id SERIAL PRIMARY KEY, search_query VARCHAR(255), formatted_query VARCHAR(255), latitude NUMERIC(10, 7), longitude NUMERIC(10, 7)...
CREATE TABLE `r_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `age` int(4) NOT NULL, `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMA...
START TRANSACTION; alter table moduleversion add column changelog text; COMMIT;
--liquibase formatted sql --changeset bs:2017-06-16-10-extensions CREATE EXTENSION IF NOT EXISTS citext; CREATE EXTENSION IF NOT EXISTS btree_gist;
SELECT * FROM users AS u WHERE u.id = 42; SELECT * FROM users AS u JOIN accounts AS a ON u.id = a.user_id WHERE u.id = 42; SELECT * FROM users AS u JOIN accounts AS a ON u.id = a.user_id JOIN banks AS b ON b.id = a.bank_id WHERE u.id = 42 AND b.id = 666; SELECT * FROM users AS u JO...
# --- !Ups CREATE TABLE USERS ( NAME varchar(255) NOT NULL, TEAM_NAME varchar(255) NOT NULL, ROLE varchar(10) NOT NULL, BUDGET integer NOT NULL, PRIMARY KEY (NAME) ); CREATE TABLE PLAYERS ( NAME varchar(255) NOT NULL, ROLE char(1) NOT NULL, VALUE integer NOT NULL, TEAM varchar(255) NOT NULL, USER ...
 CREATE PROC ERP.Usp_Del_TransformacionServicio @IdTransformacionServicio INT AS BEGIN DELETE Maestro.TransformacionServicio WHERE ID = @IdTransformacionServicio END
-- Trigger para adicionar um sufixo ao inserir um departamento CREATE OR REPLACE TRIGGER tg_sufixo BEFORE INSERT ON depto FOR EACH ROW BEGIN :new.nomedepto := :new.nomedepto || 'sons'; END; -- Trigger para impedir que o insert ou update de um professor que seja doutor CREATE OR REPLACE TRIGGER tg_doutor BEFORE I...
DROP DATABASE IF EXISTS bamazon; CREATE DATABASE bamazon; USE bamazon; CREATE TABLE products ( item_id INT NOT NULL AUTO_INCREMENT, product_name VARCHAR(45) NULL, department_name VARCHAR(45) NULL, price DECIMAL(10,2) NULL, stock_quantity INT, PRIMARY KEY (item_id) )AUTO_INCREMENT=5000; -- I began my pr...
CREATE DATABASE p3; USE p3; CREATE TABLE tabla (pagina VARCHAR(255) KEY, estatus BOOLEAN);
TRUNCATE TABLE USER; INSERT INTO USER (NAME, DESIGNATION) VALUES ('Chaitanya Ankam', 'Asoc'); INSERT INTO USER (NAME, DESIGNATION) VALUES ('Komali Bhadram', 'Asoc'); INSERT INTO USER (NAME, DESIGNATION) VALUES ('Sanjay Pareek', 'Asoc');
create schema cgi;
-- creates the database hbtn_0d_usa with the table states CREATE DATABASE IF NOT EXISTS hbtn_0d_usa; CREATE TABLE IF NOT EXISTS hbtn_0d_usa.states ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(256) NOT NULL);