text
stringlengths
6
9.38M
DROP DATABASE IF EXISTS researcherDB; CREATE DATABASE researcherDB; USE researcherDB; SET @@SESSION.auto_increment_increment=1; CREATE TABLE category( id INT NOT NULL AUTO_INCREMENT, categoryName VARCHAR(100) NOT NULL UNIQUE, description VARCHAR(100) NOT NULL, CONSTRAINT pk_category PRIMARY KEY(id) ); CREATE ...
SELECT p.ProductName AS `Produto`, p.Price AS `Preço` FROM w3schools.products AS p INNER JOIN w3schools.order_details AS o ON o.ProductID = p.ProductID WHERE o.Quantity > 80 ORDER BY p.ProductName;
alter system FLUSH BUFFER_CACHE; select 0 as c_count, ((select count(*) from customer) -(select count(distinct(o_custkey))from orders)) as custdist from dual union (select C_COUNT, count(*) as CUSTDIST from (select O_custkey, count(O_ORDERKEY) as C_COUNT from ORDERS group by O_CUSTKEY) C_ORDERS group ...
-- -- VOICE_0605_TAB (Directory) -- CREATE OR REPLACE DIRECTORY VOICE_0605_TAB AS '/data01/saf/';
CREATE TABLE projects ( uuid VARCHAR(36) NOT NULL, title VARCHAR(200) NOT NULL, end_date TIMESTAMP NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT NOW(), updated_at TIMESTAMP NOT NULL DEFAULT NOW(), deleted_at TIMESTAMP, organisation_uuid VA...
CREATE DATABASE db_agro; USE db_agro; -- TABLE USER -- all pasword wil be encrypted using SHA1 CREATE TABLE users ( id INT(11) NOT NULL, username VARCHAR(16) NOT NULL, password VARCHAR(60) NOT NULL, fullname VARCHAR(100) NOT NULL ); ALTER TABLE users ADD PRIMARY KEY (id); ALTER TABLE users MODIFY id ...
-- #1. Create an alphabetical listing (​LastName​, ​FirstName​) of all employees not living in the -- USA who have been employed with Northwinds for at least 5 years as of today. SELECT LastName, FirstName FROM nwEmployees WHERE Country <> 'USA' ORDER BY LastName ASC; -- #2. Prepare a ​Reorder L...
-- Table: audit_closed_game_player CREATE TABLE AUDIT_CLOSED_GAME_PLAYER ( auto_id bigint IDENTITY(1,1) NOT NULL, AUDIT_LABEL character varying(255) NOT NULL, HOSTNAME character varying(255) NOT NULL, AUDIT_TS timestamp without time zone NOT NULL SORTKEY, DBWRITE_TS timestamp without time zone DEFAULT SYSDATE...
/* Navicat MySQL Data Transfer Source Server : 测试环境 Source Database : dbtest Target Server Type : MYSQL Target Server Version : 50724 File Encoding : 65001 Date: 2019-12-25 10:37:22 */ SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- Table structure for `t_city_code` -- ------...
create table todo ( id bigserial not null, title text not null, description text, completed boolean not null, deleted boolean not null, primary key (id) );
#Trends in Startups SELECT * FROM startups; SELECT COUNT(name) FROM startups; SELECT SUM(valuation) FROM startups; SELECT MAX(raised) FROM startups; SELECT MAX(raised) FROM startups WHERE stage = 'Seed'; SELECT MIN(founded) FROM startups; SELECT AVG(valuation) FROM startups; SELECT categor...
INSERT INTO journal.vkr (id_vkr, date_def, user_id, id_teacher) VALUES (1, null, 2, 1); INSERT INTO journal.vkr (id_vkr, date_def, user_id, id_teacher) VALUES (2, '2019-12-07 14:59:41', 3, 2); INSERT INTO journal.vkr (id_vkr, date_def, user_id, id_teacher) VALUES (3, '2019-12-08 19:50:45', 4, 1); INSERT INTO journal.vk...
-- Force not NULL in table entry CREATE TABLE IF NOT EXISTS force_name(id INT, name VARCHAR(256) NOT NULL);
-- 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 TABLE if exists dw.dim_fecha; CREATE TABLE dw.dim_fecha ( id_fecha INT4 NOT NULL, fecha_actual DATE NOT NULL, --hora VARCHAR(5) NOT NULL, hora_categoria text NOT NULL, dia_nombre VARCHAR(11) NOT NULL, dia_de_la_semana INT2 NOT NULL, ...
CREATE TABLE clients ( ID INTEGER PRIMARY KEY AUTOINCREMENT, IP TEXT NOT NULL, TCP_PORT INTEGER NOT NULL, UDP_PORT INTEGER NOT NULL, NICKNAME TEXT NOT NULL, OPPONENT_ID INTEGER, UPDATED_AT INTEGER NOT NULL, FOREIGN KEY (OPPONENT_ID) REFERENCES clients(ID) );
ALTER ROLE "www-data" WITH LOGIN PASSWORD 'www-data'; CREATE TABLE images ( image_id SERIAL PRIMARY KEY, user_id int NOT NULL, chemin varchar(100) NOT NULL, nature int NOT NULL ); ALTER TABLE images OWNER TO "www-data";
-- Your SQL goes here CREATE TABLE users ( id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(50) UNIQUE NOT NULL, email VARCHAR(254) UNIQUE NOT NULL, password VARCHAR(40) NOT NULL, verification VARCHAR(20) UNIQUE )
DROP PROCEDURE login_knavet; CREATE PROCEDURE login_knavet(p_loginnamn char(10),p_behoriguppg char(1),p_rutin char(10),p_enhetsid INT,p_losenord varchar(32,1),p_system varchar(10)) returning int, varchar(255,0), int, char(12), char(60), char(12), char(1), datetime year to fraction(3), datetime year to frac...
CREATE TABLE [Enhabit].[AccountTypes] ( [AccountTypeId] INT NOT NULL, [AccountType] VARCHAR(250) NOT NULL, CONSTRAINT [PK_AccountTypes] PRIMARY KEY ([AccountTypeId]) )
/*------------ 歯科基本ビュー ------------*/ CREATE VIEW CMDV_T_DEN_BASE AS SELECT MN.SEQ2_NO AS SEQ2_NO -- 001.通番2 , MN.RCP_MNG_NO AS RCP_MNG_NO -- 002.レセプト管理番号 , MN.INSU_MEDI_INST_ADDR AS INSU_MEDI_INST_ADDR -- 003.保険医療機関の所在地 , R...
CREATE TABLE gender (gender ENUM('male', 'female') ); INSERT INTO `testDB`.`gender` (`gender`) VALUES ('female');
/** * Initialization file for users, permissions and databases. * */ /* To create 2 users for MySQL*/ /* Access to MySQL from anywhere */ CREATE USER 'airbnb_user_dev'@'%' IDENTIFIED BY '?Z4~~TwugPJN!?ND'; /* Access t MySQL from localhost */ CREATE USER 'airbnb_user_prod'@'localhost' IDENTIFIED BY 'e3xXKwgcZ=r...
-- We should get acquainted with the movies table. SELECT * FROM movies; -- Suppose we are only interested in two of the columns. We can select individual columns by their names (separated by a comma): SELECT name, genre, year FROM movies; -- AS is a keyword in SQL that allows you to rename a column or table using a...
INSERT INTO journal.list_kafedr (id_kafedr, name) VALUES (1, 'ИТФ'); INSERT INTO journal.list_kafedr (id_kafedr, name) VALUES (2, 'СФ'); INSERT INTO journal.list_kafedr (id_kafedr, name) VALUES (3, 'ПО'); INSERT INTO journal.list_kafedr (id_kafedr, name) VALUES (4, 'ШДО'); INSERT INTO journal.list_kafedr (id_kafedr, na...
CREATE TABLE `score` ( `id` int(11) NOT NULL , `student_id` int(11) NOT NULL, `subject_id` int(11) NOT NULL, `socre` double DEFAULT NULL, PRIMARY KEY (`id`), KEY `student_id` (`student_id`), KEY `subject_id` (`subject_id`), CONSTRAINT `score_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `student` (`id...
CREATE DATABASE `node-db` /*!40100 DEFAULT CHARACTER SET utf8 COLLATE utf8_spanish_ci */; CREATE TABLE `node-db`.`heroes` ( `id` INT NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) NULL, `power` VARCHAR(50) NULL, PRIMARY KEY (`id`)); INSERT INTO `node-db`.`heroes` ( `name`, `power`) VALUES ( 'IRONMAN', 'Money a...
DROP TABLE db_profile_room_details CASCADE CONSTRAINTS; CREATE TABLE db_profile_room_details (attribute varchar2(15), attribute_size number, val integer, PRIMARY KEY(attribute) ); set serveroutput on; declare cursor c_cur is SELECT column_name, data_length FROM user_tab_columns WHERE table_name = 'RoomDetails'; c_n...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 10, 2017 at 10:35 AM -- Server version: 10.1.28-MariaDB -- PHP Version: 7.1.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
declare v_configid Integer; v_timeperiodcount Integer; v_timeperiodtype nvarchar2(255); v_result number; v_ITEMS sys_refcursor; v_TotalCount number; v_ErrorCode number; v_ErrorMessage nvarchar2(255); begin v_configid := :ConfigId; v_timeperiodcount := :TimePeriodCount; v_timeperiodtype := :TimePer...
INSERT INTO `sys_menu` (`id`, `pid`, `name`, `url`, `memo`, `sort`, `icon`, `status`, `hidden`) VALUES ('61', 0, 'Topic Edit', '/', NULL, 0, '', 0, 0);
Select * From PortfolioProject..CovidDeaths Order by 3, 4; Select * From PortfolioProject..CovidVaccinations Order by 3, 4 Select * From PortfolioProject..CovidPatientInfo Order by 3, 4 Select Location, date, total_cases, new_cases, total_deaths, population From PortfolioProject..CovidDeaths Order by ...
set lines 500 set trimspool on set heading off set feedback off set termout off spool create_datafile_image_copies.rcv select 'run {' ||chr(10)||chr(13)|| ' allocate channel c1 device type disk format ''&target_directory' || regexp_replace(name,'.*\/(.*)','\1') ||'.iub'';' ||chr(10)||chr(13)|| ' ...
SELECT * FROM MAIL_HOOK_ADD_KNOWLEDGE_TARGETS WHERE HOOK_ID = ? ; ;
-- phpMyAdmin SQL Dump -- version 4.9.5 -- https://www.phpmyadmin.net/ -- -- Host: localhost:3306 -- Generation Time: May 27, 2021 at 03:57 AM -- Server version: 5.7.24 -- PHP Version: 7.4.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHA...
-- ************************************************************ -- Program: Eat-Da-Burger App -- Author: Rod Skoglund -- File: seeds.sql -- ************************************************************ INSERT INTO burgers (burger_name) VALUES ("Cheese Burger"); INSERT INTO burgers (burger_name) VALUES ("Bacon Burger");...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: May 27, 2018 at 05:03 PM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
-- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 15, 2020 at 04:41 PM -- Server version: 10.1.40-MariaDB -- PHP Version: 7.1.29 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
-- Select basics -- 1. Show the population of Germany. SELECT population FROM world WHERE name = 'Germany'; -- 2. Show the name and per capita gdp: gdp/population for each country where the area is over 5,000,000 km2 SELECT name, gdp/population FROM world WHERE area > 5e6; -- 3. Show the name and continent...
DROP database IF EXISTS d3nodeexpresspostgresql; create database d3nodeexpresspostgresql; CREATE TABLE populations ( year INT NOT NULL , age INT NOT NULL , sex int NOT NULL, people int NOT NULL ); INSERT INTO populations(year,age, sex, people) select 1850,0,1,1483789 union select 1850,0...
DROP TABLE IF EXISTS weight; CREATE TABLE weight ( id INT AUTO_INCREMENT PRIMARY KEY, value DECIMAL NOT NULL, time_stamp DATETIME NOT NULL, created_at DATETIME NOT NULL DEFAULT CURRENT_TIME, updated_at DATETIME NOT NULL DEFAULT CURRENT_TIME ); INSERT INTO weight (value, time_stamp) VALUES (80...
CREATE USER tyrant IDENTIFIED BY doraemon DEFAULT TABLESPACE platform_base QUOTA 500M ON USERS; GRANT ALL PRIVILEGES TO tyrant;
#select one column that is distinct USE lahmansbaseballdb; SELECT distinct playerid FROM appearances; #select multiple columns that are distinct USE lahmansbaseballdb; SELECT DISTINCT teamid, playerid from appearances;
UPDATE CLIENT SET NUMBER_OF_SEATS=11 WHERE GAME_TYPE="SLOTS"#
/* THIS CODE WAS OUR OWN WORK, IT WAS WRITTEN WITHOUT CONSULTING ANY SOURCES OUTSIDE OF THOSE APPROVED BY THE INSTRUCTOR. Bhargav Annigeri, Simon Marty */ set search_path to artistdb; DROP VIEW IF EXISTS Covers; CREATE VIEW Covers AS ( SELECT DISTINCT b1.song_id, b1.album_id FROM belongsToAlbum b1, belongsToAl...
# This is a fix for InnoDB in MySQL >= 4.1.x # It "suspends judgement" for fkey relationships until are tables are set. SET FOREIGN_KEY_CHECKS = 0; -- --------------------------------------------------------------------- -- page -- --------------------------------------------------------------------- DROP TABLE IF E...
 /** TODO: Show # of holds quantity (# of copies) (ratio? and preflagging for higher?) *** NOW MAINTAINED ON SCOOTER */ with btea_orders as ( select ov.id, ov.record_num , sum( case when sv.content ilike '%order%' then 1 else 0 end) as sent_order_count from sierra_view.order_view ov left join sierra_view.su...
use management_study; insert into class values (1,'A','2021-12-12',1), (2,'B','2021-09-16',1), (3,'C','2021-04-25',0), (4,'D','2021-11-08',0), (5,'A','2021-01-08',1); insert into student(student_name,address,phone,`status`,class_id) values ("Hùng","Đà Nẵng","0909564254",1,1 ), ("Nam","Quảng Nam...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 06-02-2018 a las 15:38:47 -- Versión del servidor: 5.7.19 -- Versión de PHP: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /...
delete from HtmlLabelIndex where id=24801 / delete from HtmlLabelInfo where indexid=24801 / INSERT INTO HtmlLabelIndex values(24801,'必须新增明细') / INSERT INTO HtmlLabelInfo VALUES(24801,'必须新增明细',7) / INSERT INTO HtmlLabelInfo VALUES(24801,'Need to add details',8) / INSERT INTO HtmlLabelInfo VALUES(24801,'必須新增明細',9) ...
 CREATE PROCEDURE [Internal].[sp_InsertToken2Gram] ( @TweetID INT, @Token NVARCHAR(500) = NULL ) AS INSERT INTO TextMining.Token2Gram ( [TweetID], [Token] ) VALUES ( @TweetID, @Token )
SELECT TOP(500) Dimension_Package.PackageId, Dimension_Package.PackageVersion, SUM(DownloadCount) 'Downloads' FROM Fact_Download INNER JOIN Dimension_Package ON Dimension_Package.Id = Fact_Download.Dimension_Package_Id INNER JOIN Dimension_Date ON Dimension_Date.Id = Fact_Download.Dimension_Date_Id WHERE Dimension_Dat...
SELECT dropIfExists('VIEW', 'prospect', 'api', true); CREATE OR REPLACE VIEW api.prospect AS SELECT prospect_number::VARCHAR AS prospect_number, prospect_name AS prospect_name, prospect_active AS active, salesrep_number AS sales_rep, warehous_code AS site_code, taxzone_code AS default_...
-- migrate:up CREATE TABLE videos ( id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, nombre VARCHAR(45) NOT NULL, duracion TIME NOT NULL, anio INTEGER NOT NULL, archivo_id INTEGER, FOREIGN KEY (archivo_id) REFERENCES archivos(id) ON DELETE CASCADE ); -- migrate:down DROP TABLE IF EXISTS videos;
delete from HtmlLabelIndex where id=24943 / delete from HtmlLabelInfo where indexid=24943 / INSERT INTO HtmlLabelIndex values(24943,'已存在') / INSERT INTO HtmlLabelInfo VALUES(24943,'已存在',7) / INSERT INTO HtmlLabelInfo VALUES(24943,'Already exists',8) / INSERT INTO HtmlLabelInfo VALUES(24943,'已存在',9) /
alter table configuration add index configuration_CLIENT_CONFIG_FC (CLIENT_CONFIG_FK), add constraint configuration_CLIENT_CONFIG_FC foreign key (CLIENT_CONFIG_FK) references configuration_client (`ID`); alter table configuration_client add index configuration...
DROP TABLE IF EXISTS password_reset_codes; CREATE TABLE password_reset_codes ( id SERIAL PRIMARY KEY, code VARCHAR, email VARCHAR, created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP )
delete from MailUserAddress t where t.rowid > (select min(p.rowid) from MailUserAddress p where t.mailaddress =p.mailaddress and t.userid = p.userid) /
CREATE TABLE employees ( id SERIAL primary key, name VARCHAR(255) NOT NULL, division_id INTEGER REFERENCES divisions(id) NOT NULL ); COMMENT ON TABLE employees IS '社員テーブル'; COMMENT ON COLUMN employees.id IS '社員ID'; COMMENT ON COLUMN employees.name IS '社員名'; COMMENT ON COLUMN employees.division_id IS '部署ID'...
-- procedure de sauvegarde mysqldump -u root -h localhost --databases sqlix --result-file=C:\dev_sauvegarde\save_sqlix.sql
SELECT groups.NAME, groups.CODE FROM vw_Groups groups WHERE --groups.domainid = '@TOKEN_SYSTEMDOMAIN@' --AND nvl(groups.SOURCE, 0) = 0 <%= IfNotNull("@SORT@", " ORDER BY @SORT@ @DIR@, 1") %>
select LauncherGroups.Name from LauncherGroups
-- Database: CIS566_Final_Project /* Showing results for Main_Table.xlsx */ /* CREATE TABLE */ CREATE TABLE Main_Table( User_ID INT primary key, Name VARCHAR(100) not null, Gender VARCHAR(100) not null, Sports_Type VARCHAR(100) not null, IKON VARCHAR(100), EPIC VARCHAR(100), MTC VARCHAR(100), Residency_City VARCHAR(1...
INSERT INTO marathon VALUES (2, 'JOM_2'); INSERT INTO marathon VALUES (1, 'JOM_1'); INSERT INTO roles (id, name) VALUES (2, 'MENTOR'); INSERT INTO roles (id, name) VALUES (1, 'TRAINEE'); INSERT INTO USERS (id, email, first_name, last_name, password, role_id) VALUES (1, 'mykola@test.com', 'Mykola', 'Demchyna', ...
create table political_leaders ( political_leaders_id NUMBER GENERATED ALWAYS AS IDENTITY (START WITH 971106001 INCREMENT BY 1) , name varchar(100), fathers_name varchar(100), mothers_name varchar(100), date_of_birth date, gender varchar(100), recognition varchar(100), spouse varchar(100), profession varchar(100), co...
CREATE TABLE account ( id VARCHAR(256) PRIMARY KEY );
ALTER TABLE expenses ADD COLUMN fitid VARCHAR(255) DEFAULT NULL UNIQUE;
DO $$ BEGIN PREPARE test_sql(INT) AS SELECT SUM(value) FROM part_table WHERE part_no = $1; FOR i IN 1..200 LOOP EXECUTE 'EXECUTE test_sql(1)'; END LOOP; DEALLOCATE test_sql; END; $$;
SELECT list_price FROM product INNER JOIN price USING(product_id) WHERE (end_date IS NULL OR end_date > NOW()) AND description LIKE '%WIFF SOFTBALL%';
delete from HtmlLabelIndex where id=28203 / delete from HtmlLabelInfo where indexid=28203 / INSERT INTO HtmlLabelIndex values(28203,'人事转正申请流程') / INSERT INTO HtmlLabelInfo VALUES(28203,'人事转正申请流程',7) / INSERT INTO HtmlLabelInfo VALUES(28203,'Personnel positive application process',8) / INSERT INTO HtmlLabelInfo VAL...
CALL sistagua_bd.`lc_sp_actualizar_cliente_natural`( '[{ "id": "5", "codigo": "C0005", "ruc": "0705114775", "apellido1": "Lasso", "apellido2": "", "nombre1": "Guillermo", "nombre2": "", "celular": "0994898148", "correo": "", "cumple":...
DROP TABLE projects; CREATE TABLE projects ( id int(6) AUTO_INCREMENT PRIMARY KEY, pr_name varchar(50), pr_time_estimate varchar(20), pr_status int(6), pr_deleted boolean ); DROP TABLE status; CREATE TABLE status ( id int(6) AUTO_INCREMENT PRIMARY KEY, st_name varchar(50) ); DROP TABLE users; CREATE TABLE u...
-- Create a stored procedure CREATE PROCEDURE Employee_Job_List AS BEGIN SELECT CONCAT(e.Lastname, ',', e.Firstname) as 'Name', j.Description as 'Job', FORMAT(J.Salary, 'C') as Salary FROM Employee e JOIN Job j on j.Id = e.JobId ORDER BY Name; end
alter table ACT_HI_TASKINST add CATEGORY_ nvarchar(255); alter table ACT_HI_TASKINST add FORM_KEY_ nvarchar(255); alter table ACT_HI_TASKINST add CLAIM_TIME_ datetime; alter table ACT_HI_VARINST add LAST_UPDATED_TIME_ datetime; alter table ACT_HI_ACTINST alter column ASSIGNEE_...
/* Query 1 */ SELECT * FROM doctor D, employee E WHERE D.specialty='Heart Surgery' AND D.eid = E.eid; /* Query 2 */ SELECT * FROM nurse N, employee E WHERE E.city = 'Laval' AND E.startDate > '2012-06-01' AND E.lastDate IS NULL AND E.eid = N.eid; /* Query 3 */ -- Need to implement medicareNumber var SE...
-- Create the database "tfcweb" and initial setup -- -- This assumes: -- - postgresql/postgis is already installed -- - user is accessing psql as user 'postgres' -- -- -- -------------------Create database ----------------------------------- CREATE DATABASE tfcweb; CREATE USER tfc_prod; ALTER ROLE tfc_prod SET clie...
SET SERVEROUTPUT ON DECLARE v_exist NUMBER :=0; BEGIN SELECT 1 INTO v_exist FROM CPI.CG_REF_CODES WHERE rv_domain = 'GIAC_ACCTRANS.TRAN_CLASS' AND rv_low_value = 'CPR'; IF v_exist = 1 THEN DBMS_OUTPUT.PUT_LINE('Record with rv_domain = GIAC_ACCTRANS.TRAN_CLASS and rv_low_v...
insert into location values (1, 'hawaii', 'oahu', 'somestreet', 12345); insert into account values ('admin', 'admin', 'n/a', 'n/a', 'n/a', 'n/a', 1);
CREATE TABLE public.expenditures AS SELECT id as id, committeeid as committee_id, fileddocid as filed_doc_id, etransid as etrans_id, lastonlyname as last_name, firstname as first_name, expendeddate as expended_date, amount as amount, aggregateamount as aggregate_amount, address...
SELECT A.TZ_SCORE_ITEM_ID FROM PS_TZ_MODAL_DT_TBL A, PS_TZ_RS_MODAL_TBL B WHERE B.TZ_JG_ID = ? AND B.TZ_SCORE_MODAL_ID = ? AND A.TREE_NAME = B.TREE_NAME
-- Start of SQL Homework for Omar Castillo -- Ensure we are using the Sakila Database USE sakila; -- 1a. Display the first and last names of all actors from the table actor. SELECT first_name, last_name FROM actor; -- 1b. Display the first and last name of each actor in a single column in upper case letters. Name th...
drop table if exists teachers, students, staff, classes, languages, modules, attendance; CREATE TABLE languages ( id SERIAL PRIMARY KEY, name TEXT ); CREATE TABLE students ( id SERIAL PRIMARY KEY, name TEXT NOT NULL, email VARCHAR(30) NOT NULL, address TEXT, phone_numbe...
create table Actors( first_name varchar(50) not null, last_name varchar(50) not null, gender varchar(10) not null, zodiac_sign varchar(50) movie varchar(100) not null, primary key(first_name, last_name), foreign key(movie) references Movies ) create table Movies( movie_id int(2), title varchar(100)...
/*!40101 SET NAMES utf8 */; # 用户信息表 CREATE TABLE IF NOT EXISTS `user_info` ( `id` int(11) NOT NULL AUTO_INCREMENT comment '用户id', `password` varchar(255) DEFAULT NULL comment '密码', `name` varchar(255) DEFAULT NULL comment '用户名', `nick` varchar(255) DEFAULT NULL comment '用户昵称', `detail_info` longtex...
prompt --application/pages/page_00015 begin -- Manifest -- PAGE: 00015 -- Manifest End wwv_flow_api.component_begin ( p_version_yyyy_mm_dd=>'2020.03.31' ,p_release=>'20.1.0.00.13' ,p_default_workspace_id=>20 ,p_default_application_id=>8950 ,p_default_id_offset=>33309244842782322 ,p_default_owner=>'ORACLE' ); w...
-- To-Do List View SELECT dropIfExists('VIEW', 'todo', 'api'); CREATE OR REPLACE VIEW api.todo AS SELECT todoitem_id AS task_number, todoitem_owner_username AS owner, todoitem_username AS assigned_to, todoitem_name AS task_name, incdtpriority_name AS priority, incdt_number AS incident, op...
CREATE DATABASE IF NOT EXISTS `curso_code_education` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `curso_code_education`; -- MySQL dump 10.13 Distrib 5.5.37, for debian-linux-gnu (x86_64) -- -- Host: 127.0.0.1 Database: curso_code_education -- ------------------------------------------------------ -- Server versi...
/* Warnings: - A unique constraint covering the columns `[slug]` on the table `User` will be added. If there are existing duplicate values, this will fail. - Added the required column `google_id` to the `User` table without a default value. This is not possible if the table is not empty. - Added the required c...
-- ALERTZONE TABLE CREATE TABLE ALERTZONE ( ZONEID SERIAL PRIMARY KEY, USERID INT REFERENCES PALUSER(USERID), ZONECREATETIME TIMESTAMP, ZONEACTIVATED INT, ZONECOORDINATES GEOMETRY(Polygon, 4326) ); --creating index CREATE INDEX ALERTZONE_gix ON ALERTZONE USING GIST (ZONECOORDINATES); --sample insert for...
# Account schema # --- !Ups CREATE TABLE account ( a_id serial primary key, a_customer_id integer NOT NULL, a_iban text, a_balance numeric(1000,2), FOREIGN KEY (a_customer_id) REFERENCES customer(c_id) ); # --- !Downs DROP TABLE IF EXISTS account;
delete from HtmlLabelIndex where id=22269 / delete from HtmlLabelInfo where indexid=22269 / INSERT INTO HtmlLabelIndex values(22269,'不能在') / INSERT INTO HtmlLabelInfo VALUES(22269,'不能在',7) / INSERT INTO HtmlLabelInfo VALUES(22269,'can not',8) / INSERT INTO HtmlLabelInfo VALUES(22269,'不能在',9) / delete from HtmlLa...
-- inserts para InternalPermissionGroup_InternalPermission de ChangeApplicationOwner insert into InternalPermissionGroup_InternalPermission (internalPermissionGroups_id, internalPermissions_id) select ipg.id as internalPermissionGroups_id, ip.id as internalPermissions_id from InternalPermissionGroup ipg, InternalPer...
INSERT INTO Pessoa ("id_pessoa", "nome_pessoa", "foto", "email") VALUES ('38505', 'Leandro Castan', 'https://s.glbimg.com/es/sde/f/2010/11/17/fc125a7a134e459c66b08c32448c1426_140x140.jpeg', 'leandrocastan38505@pelada.com'), ('43618', 'Luiz Felipe Scolari', 'https://s.glbimg.com/es/sde/f/2014/06/11/c1749b2e1565635c44be...
ALTER TABLE job_message ADD COLUMN incoming varchar(100);
-- phpMyAdmin SQL Dump -- version 3.4.5 -- http://www.phpmyadmin.net -- -- Client: localhost -- Généré le : Mar 03 Avril 2012 à 14:26 -- Version du serveur: 5.5.16 -- Version de PHP: 5.3.8 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
update system_access_data set password = "A98C1F37A43329BFDF224EB9AFBBD771" where employee_id = 1; update system_access_data set password = "88EE39CBF13772B58E1D5EB907AA30D1" where employee_id = 2; update system_access_data set password = "39038C2D19468EE861A0BB8ABD2B936F" where employee_id = 3; update system_access_da...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Φιλοξενητής: 127.0.0.1 -- Χρόνος δημιουργίας: 15 Οκτ 2017 στις 18:16:27 -- Έκδοση διακομιστή: 10.1.19-MariaDB -- Έκδοση PHP: 5.6.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHA...
SELECT * FROM SERVICE_LOCALE_CONFIGS WHERE DELETE_FLAG = 0 ORDER BY INSERT_DATETIME %s LIMIT ? OFFSET ?;
# ************************************************************ # Sequel Ace SQL dump # Version 3034 # # https://sequel-ace.com/ # https://github.com/Sequel-Ace/Sequel-Ace # # Host: ls-ed52acd835d3b04e8df8a962fff8a5e1f827d6c5.camxrlw6o2ww.us-east-1.rds.amazonaws.com (MySQL 5.7.33-log) # Database: taylorsvilletabledata #...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 26-06-2016 a las 19:00:31 -- Versión del servidor: 10.1.13-MariaDB -- Versión de PHP: 5.6.21 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...