text
stringlengths
6
9.38M
CREATE TABLE Users ( id SERIAL, email VARCHAR(50) NOT NULL, password VARCHAR(500), constraint pk_usuario primary key (id) ); INSERT INTO Users (email, password) values ('wanderson.hal@gmail.com', '123');
set pagesize 100 set echo on set pause on drop table t_days; create table t_days ( day_col varchar2(30), val number); insert into t_days values ('MONDAY',10); insert into t_days values ('TUESDAY',20); insert into t_days values ('WEDNESDAY',30); insert into t_days values ('THURSDAY',40); insert into t_days values (...
alter session set "_px_trace"=high,all; select /*+ PARALLEL(20) */ count(*) from TEST_TAB; alter session set "_px_trace"=[[Verbosity,]area],[[Verbosity,]area],..,[time]; For Verbosity, the possible values are as follows: High Medium Low For the Area parameter, the possible values are as fol...
SELECT TOP 100 'https://www.brookes.ac.uk/' + lower(clv.AliasLink) AS url_alias, clv.content_id, clv.content_title, clv.Path, clv.template_id, tt.template_filename, tt.template_name, clv.content_type, clv.content_subtype, clv.private, clv.IsArchived, clv.published FROM C...
-- ?? CREATE DATABASE beauty DEFAULT CHARSET utf8 COLLATE utf8_general_ci; -- ?? CREATE TABLE IF NOT EXISTS `stu` ( `id` int(11) NOT NULL AUTO_INCREMENT, `stu` varchar(255) DEFAULT NULL, `img` varchar(255) NOT NULL, `beauti` varchar(255) DEFAULT NULL, `score` int(20) NOT NULL DEFAULT '1400', PRIMARY KEY (`...
insert into t_author(name) values ('Chrighton'); insert into t_book (author_id, name, isbn) values (1, 'Jurassik parc', 13456); insert into t_book (author_id, name, isbn) values (1, 'Sphere', 562863);
SELECT * FROM ROLE ;
CREATE DATABASE `salt_job_sys` DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
-- -- 删除数据表 `qs_statistics_company` -- DROP TABLE IF EXISTS `qs_statistics_company`; -- -- 删除数据表 `qs_statistics_jobs` -- DROP TABLE IF EXISTS `qs_statistics_jobs`; -- -- 删除数据表 `qs_statistics_jobs` -- DROP TABLE IF EXISTS `qs_statistics_resume`;
DROP TABLE IF EXISTS static_data; CREATE TABLE static_data( appid INT, name_ CHAR(300), release_date CHAR(300), english INT, developer CHAR(300), publisher CHAR(300), platforms CHAR(300), required_age INT...
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; -- Dumping database structure for db_oxa CREATE DATABASE IF...
-- table created at 2016-03-08 CREATE TABLE IF NOT EXISTS `makefitreal`.`mfr_alimentos` ( `id` INTEGER PRIMARY KEY AUTO_INCREMENT , `date_created` INTEGER (11) , `last_updated` INTEGER (11) , `kcals_100g` TINYINT (5) , `carbs_100g` DOUBLE (5,2) , `protein_100g` DOUBLE (5,2) , `fat_100g` DOUBLE (5,2) , `fiber_100g` D...
CREATE TABLE `mhs` ( `nim` varchar(13) collate latin1_general_ci NOT NULL, `nama` varchar(50) collate latin1_general_ci NOT NULL, `jurusan` varchar(20) collate latin1_general_ci NOT NULL, PRIMARY KEY (`nim`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci; INSERT INTO `mhs` (`nim`, `nama`, `jur...
production: adapter: mysql2 database: redmine_42 host: 127.0.0.1 username: root password: "" encoding: utf8mb4 development: adapter: mysql2 database: redmine_42_development host: 127.0.0.1 username: root password: "" encoding: utf8mb4 test: adapter: mysql2 database: redmine_42_test host:...
ALTER TABLE users ADD hobbies set <text>;
/* Navicat MySQL Data Transfer Source Server : 1761 Source Server Type : MySQL Source Server Version : 80017 Source Host : localhost:3306 Source Schema : book_management Target Server Type : MySQL Target Server Version : 80017 File Encoding : 65001 Date: 15/07/2021 1...
create table if not exists user_activation_report ( id bigint not null auto_increment, name varchar(100) not null, type varchar(30) not null, user_id bigint not null, data longblob not null, primary key (id), foreign key (user_id) references user (id) );
CREATE TABLE IF NOT EXISTS `proxy` ( `ID` int auto_increment, `GMT_CREATE` datetime, `GMT_MODIFIED` timestamp default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, `IP` varchar(64), `PORT` int default 0, `PATH` varchar(64) COLLATE utf8_bin, `CLUSTER_ID` int default 0, PRIMARY KEY (`ID`), UNIQUE KEY (...
insert into category_tbl values(1,'Cloths'); insert into category_tbl values(2,'Funitures'); insert into category_tbl values(3,'Kichen Utencil'); insert into category_tbl values(4,'Electronics'); insert into category_tbl values(5,'Food'); insert into category_tbl values(6,'Cars'); insert into category_tbl values(7,'Fru...
DROP TABLE IF EXISTS Person; CREATE TABLE person ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(250) NOT NULL ); INSERT INTO person (name) VALUES ('Vasia'), ('Petia'), ('Olga');
SELECT setMetric('ServerVersion', '3.6.0Beta');
-- MySQL dump 10.13 Distrib 5.5.32, for debian-linux-gnu (x86_64) -- -- Host: localhost Database: rt4_clinical_3 -- ------------------------------------------------------ -- Server version 5.5.32-0ubuntu0.12.04.1 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESU...
alter database CoffeeTrade set allow_snapshot_isolation on waitfor delay '00:00:10' BEGIN TRANSACTION UPDATE Shop SET shopDuns = 1000 WHERE city like 'NYC'; waitfor delay '00:00:10' COMMIT TRAN alter database CoffeeTrade set allow_snapshot_isolation off UPDATE Shop SET shopDuns = 20 WHERE city like 'NYC'; select *...
-- 9.续租订单信息表 use car_rental_sys_db; create table violate_info ( id char(32) PRIMARY KEY, car_id char(32) NOT NULL, violate_date date NOT NULL, violate_event char(20), violate_fee float, violate_status boolean, record_creator char(32) NOT NULL, record_create_time Date NOT NULL, FOREIGN KEY(record_creator) R...
UPDATE behandling SET vedtakstidspunkt = subquery.ny_vedtakstidspunkt FROM (SELECT b.id , coalesce( bh.endret_tid, CASE WHEN b.resultat = 'HENLAGT' THEN b.endret_tid END, CASE WHEN b.arsak = 'MIGRERING' OR b.arsak = 'G_OMREGNING' THEN ty.vedtakstidspunkt END ) ny_v...
CONNECT 'jdbc:derby://10.11.1.101:1527/product-db;create=true;user=APP;password=APP'; DROP TABLE PRODUCT;
delete from HtmlLabelIndex where id=24862 / delete from HtmlLabelInfo where indexid=24862 / INSERT INTO HtmlLabelIndex values(24862,'冲销') / INSERT INTO HtmlLabelInfo VALUES(24862,'冲销',7) / INSERT INTO HtmlLabelInfo VALUES(24862,'write-off',8) / INSERT INTO HtmlLabelInfo VALUES(24862,'沖銷',9) / delete from HtmlLab...
use sop; DROP TABLE IF EXISTS `config_service_route`; CREATE TABLE `config_service_route` ( `id` varchar(128) NOT NULL DEFAULT '' COMMENT '路由id', `service_id` varchar(128) NOT NULL DEFAULT '', `name` varchar(128) NOT NULL DEFAULT '' COMMENT '接口名', `version` varchar(64) NOT NULL DEFAULT '' COMMENT '版本号', `pr...
CREATE TABLE t_webtoon( w_no INT auto_increment PRIMARY KEY, w_platform INT NOT NULL, w_title VARCHAR(100) NOT NULL, w_genre VARCHAR(100) NOT NULL, w_storywriter VARCHAR(100) NOT NULL, w_artist VARCHAR(100) NOT NULL, w_story VARCHAR(1000) NOT NULL, w_thumbnail VARCHAR(1000) NOT NULL, w_link VARCHAR(1000) NOT n...
CREATE TABLE IF NOT EXISTS [DEED_CLEAN_TABLE] SELECT concat_ws(' ', property_house_number_prefix, property_house_number, property_house_number_2, property_house_number_suffix, property_direction, property_street_name, property_mode, property_quadrant) Property_Addre...
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 Name1 -- ----------------------------------------...
-- problem 12 SELECT b.name, founded FROM brands AS b LEFT JOIN models AS m ON b.name != m.brand_name WHERE m.year > 1940 -- problem 13 SELECT b.name, m.name, m.year, b.discontinued, b.discontinued - m.year AS years_until_brand_discontinued FROM models AS m LEFT JOIN brands AS b ON m.brand_name = b.name WHERE b.discon...
-- 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='TRADITIONAL,ALLOW_INVALID_DATES'; -- ----------------------------------------------------- -- Schema mydb -- -...
# Write your MySQL query statement below select id, case when p_id is null then "Root" when id is not null and id in (select distinct(p_id) as id from Tree) then "Inner" else "Leaf" end as type from Tree;
/*登陆日志*/ CREATE TABLE LoginLog ( Id int IDENTITY (1, 1) not null,/*自增*/ UserId int not null,/*登陆用户id*/ IP varchar(20) not null,/*登陆ip地址*/ LastLoginTime datetime not null,/*最后登陆时间*/ PRIMARY KEY (Id) ) /*接口类型表*/ create table InterfaceType ( Id int IDENTITY (1, 1) not null,-----系统id TypeName varchar(50) not nu...
-- Moved Pyrewood Village event from game_event_creature to game_event_creature_data -- to reduce data redundancy -- Removed 'Pyrewood Village - Day' event: human NPC will be spawned by default -- Moved 'Pyrewood Village - Curse of the Worgen' event id to decrease core memory usage DELETE FROM `game_event` WHERE `entr...
insert into products (name, price, created_at) values ('Google Pixel','500', now()); insert into products (name, price, created_at) values ('IPhone 11','550', now()); insert into products (name, price, created_at) values ('Samsung Galaxy 20','600', now()); insert into products (name, price, created_at) values ('Xiaomi ...
-- phpMyAdmin SQL Dump -- version 4.8.4 -- https://www.phpmyadmin.net/ -- -- 主机: 127.0.0.1 -- 生成日期: 2019-06-11 10:31:42 -- 服务器版本: 10.1.37-MariaDB -- PHP 版本: 7.1.26 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACT...
DROP FUNCTION conditional_true_event(boolean); DROP FUNCTION conditional_change_event(anyelement);
insert into transaction (tid,deposit,withdraw,transaction_date,EID,Account_number) values(1,2000,0,sysdate,8,10); insert into transaction (tid,deposit,withdraw,transaction_date,EID,Account_number) values(2,2000,0,sysdate,8,10); insert into transaction (tid,deposit,withdraw,transaction_date,EID,Account_number) values(3,...
INSERT INTO sample(id, name) VALUES(1, 'YAMADA'); INSERT INTO sample(id, name) VALUES(2, 'SATO'); INSERT INTO sample(id, name) VALUES(3, 'TANAKA'); INSERT INTO sample(id, name) VALUES(4, 'SUZUKI');
-- For MailReadChecker -- Nigel Ticknor -- -- phpMyAdmin SQL Dump -- version 4.4.15.10 -- https://www.phpmyadmin.net 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_COLLATIO...
update ACT_GE_PROPERTY set VALUE_ = '6.7.2.1' where NAME_ = 'common.schema.version';
create table ACT_RU_EVENT_SUBSCR ( ID_ varchar(64) not null, REV_ integer, EVENT_TYPE_ varchar(255) not null, EVENT_NAME_ varchar(255), EXECUTION_ID_ varchar(64), PROC_INST_ID_ varchar(64), ACTIVITY_ID_ varchar(64), CONFIGURATION_ varchar(255), CREATED_ timestamp(3) not null DEFAULT ...
SELECT *, (id+10) as soma FROM usuarios HAVING soma < 5;
-- phpMyAdmin SQL Dump -- version 4.0.10deb1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generato il: Giu 21, 2016 alle 09:38 -- Versione del server: 5.5.38-0ubuntu0.14.04.1 -- Versione PHP: 5.5.9-1ubuntu4.5 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_C...
CREATE TABLE `ci_sessions` ( `id` varchar(128) NOT NULL, `ip_address` varchar(45) NOT NULL, `timestamp` int(10) UNSIGNED NOT NULL DEFAULT '0', `data` blob NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `mst_group_menu` ( `menu_group_id` int(11) NOT NULL, `menu_group_name` varchar(255) NOT N...
insert into ir_translation (lang, src, name, type, res_id, value, user_id) select 'te_IN', src, name, type, res_id, lower(concat(value, '$', substring(md5(concat(src, type, name, res_id)) for 4), '$')), user_id from ir_translation where lang = 'fr_FR';
select c2.card_uid, c2.bbs_uid, c2.title, c2.password, c2.open_date, c2.refresh_date, c2.owner_only, c2.dead, c2.status, p.name, c1.size from (select card.card_uid, count(post.post_uid) size from card, post where 1 = 1 and card.card_uid = :card_uid and post.card_uid = card.card_u...
-- phpMyAdmin SQL Dump -- version 4.2.7.1 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Jan 30, 2015 at 07:14 PM -- Server version: 5.6.20 -- PHP Version: 5.5.15 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */...
CREATE DATABASE delilahresto; USE delilahresto; -- MySQL dump 10.13 Distrib 8.0.20, for Win64 (x86_64) -- -- Host: localhost Database: delilahresto -- ------------------------------------------------------ -- Server version 8.0.22 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD...
USE temp_local; INSERT INTO tipo VALUES (1, "Termómetro"), (2, "Dinamómetro"), (3, "Extensómetro"), (4, "Vibrómetro"), (5, "Pressão"), (6, "Acelerómetro X"), (7, "Acelerómetro Y"), (8, "Acelerómetro Z");
alter table ACT_RU_EVENT_SUBSCR add column LOCK_TIME_ timestamp(3) NULL; alter table ACT_RU_EVENT_SUBSCR add column LOCK_OWNER_ varchar(255); update ACT_GE_PROPERTY set VALUE_ = '6.7.2.2' where NAME_ = 'eventsubscription.schema.version';
CREATE TABLE campos_amplios ( id SERIAL PRIMARY KEY, nombre VARCHAR(100) NOT NULL, codigo integer NOT NULL, idRegimenAcademico BIGINT REFERENCES regimenes_academicos(id) );
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 03, 2020 at 12:55 PM -- Server version: 10.4.8-MariaDB -- PHP Version: 7.3.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
SET LONG 2000000 SET TERMOUT OFF SET PAGESIZE 0 set serveroutput on set feedback OFF SPOOL ../README.md; declare v_out varchar2(255); v_pkg varchar2(255); v_obj_type varchar2(255); v_obj_name varchar2(255); v_obj_desc varchar2(255); v_obj_desc_name varchar2(255); v_obj_desc_desc varchar2(255); v_obj_param_name varcha...
/*********************************************************************************** || PROCEDURE INFORMATION || || Department: Value Engineering || Creator: Luis Fuentes || Date: 27/08/2019 || Category: Side project for Eric Dush || || Description: This...
create table sys_function ( id int auto_increment primary key, code varchar(500) null comment '编码', name varchar(100) null comment '模块名称', description varchar(500) null comment '访问连接', menu_rank varchar(11) null comment '排序', status varchar(1) null commen...
use msf; DROP VIEW IF EXISTS vw_msf_patients; CREATE ALGORITHM = UNDEFINED DEFINER = `root`@`localhost` SQL SECURITY DEFINER VIEW `vw_msf_patients` AS select `patient_emr`.`patient_id` AS `PatientID`, IFNULL(`last_zetesdc_msf`.`BedLocationID`, '') AS `BedLocationID`, `last_...
SELECT CONSTIT_ID , SOLICITOR_ID , TABLEENTRIES.LONGDESCRIPTION as solicitor_type , AMOUNT , NOTES , cs."SEQUENCE" as weight FROM CONSTIT_SOLICITORS cs LEFT JOIN TABLEENTRIES ON cs.SOLICITOR_TYPE = TABLEENTRIES.TABLEENTRIESID ORDER BY weight
/*******************************************PUNTO 2*****************************************************/ /* La facturación se realizará por un proceso automático en la base de datos. Se debe programar este proceso para el primer día de cada mes y debe generar una factura por medidor y debe tomar en cuenta todas las me...
-- Account Image SELECT dropifexists('VIEW', 'accountimage','API'); CREATE VIEW api.accountimage AS SELECT crmacct_number AS account_number, image_name AS image_name FROM crmacct(), imageass, image WHERE ((crmacct_id=imageass_source_id) AND (imageass_source='CRMA') AND (imageass_image_id=ima...
declare v_TaskId Integer; v_Target nvarchar2(255); v_TargetName nvarchar2(255); v_state nvarchar2(255); v_sysdate date; v_InitMethod nvarchar2(255); v_result number; v_result2 nvarchar2(255); v_IsValid number; begin v_TaskId := :TaskId; v_Target := :Target; v_sysdate := sysdate; v_IsValid := 1...
-- Table: public.employee -- DROP TABLE public.employee; CREATE TABLE public.employee ( employee_id bigint NOT NULL, department character varying(255), first_name character varying(255), last_name character varying(255), salary bigint, CONSTRAINT employee_pkey PRIMARY KEY (employee_id) ) WITH ( OIDS=FAL...
BEGIN FOR cur IN (SELECT constraint_name FROM all_constraints WHERE owner = 'CPI' AND constraint_name = 'WINV_TAX_PK' AND table_name = 'GIPI_WINV_TAX') LOOP EXECUTE IMMEDIATE 'ALTER TABLE CPI.GIPI_WINV_TAX DROP CONSTRAINT WINV_TAX_PK'; DBMS_OUTPUT...
CREATE TABLE IF NOT EXISTS tasks ( id UUID NOT NULL, shard_id UUID NOT NULL, status VARCHAR(50) NOT NULL, source VARCHAR(200) NOT NULL, destination VARCHAR(200) NOT NULL, time_for_execution TIMESTAMP NOT NULL, conte...
REM if1.sql REM Version 1.0, last updated 5/7/97 REM This block illustrates an IF statement, as described in REM Chapter 2 of _Oracle8 PL/SQL Programming_ by Scott Urman. DECLARE v_NumberSeats rooms.number_seats%TYPE; v_Comment VARCHAR2(35); BEGIN /* Retrieve the number of seats in the room identified b...
-- a script that converts hbtn_0c_0 database to UTF8 (utf8mb4, collate utf8mb4_unicode_ci) i ALTER DATABASE hbtn_0c_0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci; USE hbtn_0c_0; ALTER TABLE first_table CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
-- phpMyAdmin SQL Dump -- version 4.0.4.2 -- http://www.phpmyadmin.net -- -- Machine: localhost -- Genereertijd: 26 feb 2017 om 18:33 -- Serverversie: 5.6.13 -- PHP-versie: 5.4.17 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40...
DELETE FROM Kunde WHERE brugernavn IS NULL
-- Kevin Tran -- CPSC 321 - 02 -- Homework 7 -- Description: Outer queries and normalization -- Query 1 all of the ids and titles of films that are not in any store’s inventory. SELECT f.film_id,f .title FROM film f LEFT JOIN inventory i USING(film_id) WHERE i.film_id IS null GROUP BY f.title, f.film_id; -- Query ...
CREATE TABLE `books` ( `id` int NOT NULL AUTO_INCREMENT, `title` varchar(45) DEFAULT NULL, `description` varchar(45) DEFAULT NULL, `author` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; SELECT * FROM onboarding.books;
PRAGMA foreign_keys=OFF; BEGIN TRANSACTION; CREATE TABLE category_type (id INTEGER NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)); CREATE TABLE category (id INTEGER NOT NULL, category_type_id INTEGER DEFAULT NULL, name VARCHAR(255) NOT NULL COLLATE BINARY, PRIMARY KEY(id), CONSTRAINT FK_64C19C1294CCED FOREIGN K...
CREATE DATABASE `spring-practice` /*!40100 DEFAULT CHARACTER SET utf8 */;
update ACT_GE_PROPERTY set VALUE_ = '6.6.0.1' where NAME_ = 'common.schema.version';
-- Talleres Paco ----------------------------- INSERT INTO usuarios (nombre_usuario,contra,enabled) VALUES ('manolo','manolo', TRUE ); INSERT INTO authorities VALUES ('manolo','cliente'); INSERT INTO usuarios (nombre_usuario,contra,enabled) VALUES ('manoli','manoli', TRUE ); INSERT INTO authorities VALUES ('manoli','cl...
-- account type DROP TYPE sht.ACCOUNT_TYPE; CREATE TYPE sht.ACCOUNT_TYPE AS ENUM ('MERCHANT_SETTLEMENT', 'MERCHANT_GUARANTEE', 'MERCHANT_PAYOUT', 'PROVIDER_SETTLEMENT', 'SYSTEM_SETTLEMENT', 'EXTERNAL_INCOME', 'EXTERNAL_OUTCOME'); -- cash_flow_posting table CREATE TABLE sht.cash_flow_posting ( id BIGSE...
-- 1 - List all customers (name + email), ordered alphabetically -- (no extra information) SELECT first_name, email FROM customers ORDER BY first_name ASC; -- 2 - List tracks (Name + Composer) of the Classical playlist -- Table name ALWAYS in plural! (ex: tracks) -- Foreign keys ALWAYS in singular (ex: track_id) SE...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Lun 20 Mai 2019 à 16:50 -- Version du serveur : 5.7.26-0ubuntu0.18.04.1 -- Version de PHP : 7.2.17-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SE...
-- phpMyAdmin SQL Dump -- version 4.7.7 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: 01-Fev-2019 às 08:12 -- Versão do servidor: 10.1.30-MariaDB -- PHP Version: 7.2.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD...
DROP VIEW IF EXISTS workflow_list_all; CREATE VIEW workflow_list_all AS SELECT workflow.id, workflow.workflow_no, workflow.workflow_category, ( SELECT code.code_name FROM code WHERE code.code_bunrui::text = '10006'::text AND code.code::text = workflow.workflow_category::text) AS workfl...
# Renombrar una tabla # ALTER TABLE usuarios RENAME TO usuarios_renom; # Cambiar el nombre a columna # ALTER TABLE usuarios_renom CHANGE apellidos apellido varchar(100) null; # Modificar columna sin cambiar nombre # ALTER TABLE usuarios_renom MODIFY apellido char(50) not null; # Añadir columna a tabla # ALTER TABLE ...
CREATE TABLE BOOK_ORDER ( ISBN VARCHAR(30) NOT NULL, TITLE VARCHAR(30) NOT NULL, DATE_ORDERED DATE NOT NULL , USER_NAME VARCHAR(30) , COPIES INT NOT NULL , FOREIGN KEY (ISBN) REFERENCES BOOK (ISBN) ON UPDATE CASCADE ON DELETE CASCADE, FOREIGN KEY (TITLE) REFERENCES BOOK (TITLE) ON UPDATE CASCADE O...
drop table if exists TRAFODION.odb_test.div_more; CREATE TABLE TRAFODION.odb_test."DIV_MORE"(C1 numeric(7,1),C2 numeric(9,2));
-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Server version: 5.7.21 - MySQL Community Server (GPL) -- Server OS: Win64 -- HeidiSQL Version: 9.5.0.5288 -- -------------------------------------------------------- /*...
-- Let's say we wanted to get the name of all incomplete assignments for a student. It's a fairly simple query to get all completed assignments for a student. SELECT assignment_id FROM assignment_submissions JOIN students ON students.id = student_id WHERE students.name = 'Ibrahim Schimmel'; -- If we had the complete...
/* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50722 Source Host : localhost:3306 Source Database : base Target Server Type : MYSQL Target Server Version : 50722 File Encoding : 65001 Date: 2018-07-26 15:39:12 */ SET FOREIGN_KEY_CHE...
SELECT LoginProvider, ProviderDisplayName, ProviderKey FROM UserLogins (NOLOCK) WHERE UserID = @UserID
SELECT students.name, AVG(assignment_submissions.duration) as average_assignment_duration FROM students JOIN assignment_submissions on students.id = student_id WHERE students.end_date is null GROUP BY students.name ORDER BY AVG(assignment_submissions.duration) DESC
CREATE TABLE IF NOT EXISTS address( id BIGINT PRIMARY KEY AUTO_INCREMENT COMMENT "Unique Id of address", uid BIGINT COMMENT "Unique Id of the user", landmark VARCHAR(100) COMMENT "any object or feature to identify the location ", city VARCHAR(30) NOT NULL COMMENT "city/village of the user", state V...
alter table "public"."assets" drop constraint "assets_parentId_fkey", add constraint "assets_parentId_fkey" foreign key ("parentId") references "public"."assets" ("id") on update no action on delete no action;
select * from store_sales, date_dim, item, customer, store where d_date_sk = ss_sold_date_sk and ss_item_sk = i_item_sk and ss_store_sk = s_store_sk and ss_customer_sk = c_customer_sk and i_manager_id=97 and d_moy=12 and d_year=2002 and ss_list_price <= 17.5
CREATE DATABASE IF NOT EXISTS `todo`; CREATE TABLE todo ( todo_id SERIAL PRIMARY KEY, description VARCHAR(255) NOT NULL, );
'a11~'f(npost(['artigoi']v2^i'_'v2^a),1,0)'~ a12~'f(npost(['artigoh']v2^i'_'v2^a),1,0)'~ a13~'f(npost(['artigoc']v2^a'_'v2^i),1,0)'~ a14~'f(npost(['artigoc']v2^a'44_'v2^t.46),1,0)'~'
CREATE TABLE IF NOT EXISTS REGISTRATION( ID serial, givenName text, familyName text, address1 text, address2 text, city text, state text, zip text, country text, date timestamp DEFAULT NOW(), PRIMARY KEY(ID) );
CREATE VIEW dbo.pages_v AS SELECT dbo.pages.page_id, dbo.pages.page_name, dbo.pages.page_title, dbo.master_pages.master_page_id, dbo.master_pages.master_page_name FROM dbo.pages INNER JOIN dbo.master_pages ON dbo.pages.master_page_id = dbo.master_pages.master_page_id
SELECT USERS.USER_ID, USERS.USER_KEY, USERS.USER_NAME, COUNT(KNOWLEDGES.KNOWLEDGE_ID) AS KNOWLEDGE_COUNT FROM USERS LEFT OUTER JOIN KNOWLEDGES ON (KNOWLEDGES.INSERT_USER = USERS.USER_ID AND KNOWLEDGES.DELETE_FLAG = 0) WHERE USERS.USER_ID = ? AND USERS.DELETE_FLAG ...
# FILL DISTRICT # 1. Автономна республіка Крим INSERT INTO District VALUES (1, "Алушта, місто",1,1); INSERT INTO District VALUES (2, "Бахчисарайський район",2,1); INSERT INTO District VALUES (3, "Білогірський район",3,1); INSERT INTO District VALUES (4, "Джанкойський район",4,1); INSERT INTO District VALUES (5, "Євпат...
alter table file_uploads rename to file_upload; create type report_state as enum ('DRAFT', 'SUBMITTED', 'ACCEPTED', 'REJECTED'); create type report_type as enum ('TRAVEL PATH REPORT', 'TRACK OBSERVATION REPORT'); create table report ( id bigint not null primary key generat...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: May 08, 2018 at 09:30 AM -- Server version: 10.1.31-MariaDB -- 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...