text
stringlengths
6
9.38M
create table application_user ( id bigint not null auto_increment, avatar longblob, full_name varchar(128), nick_name varchar(128), password varchar(128), user_name varchar(64), primary key (id)) engine=MyISAM;
-- phpMyAdmin SQL Dump -- version 4.9.2 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1:3306 -- Tiempo de generación: 31-12-2020 a las 03:13:47 -- Versión del servidor: 10.4.10-MariaDB -- Versión de PHP: 7.3.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00...
SELECT type, date, shift FROM exceptions WHERE emp_id = $1
CREATE TABLE `tbl_likes` ( `like_id` int(11) NOT NULL AUTO_INCREMENT, `wish_id` int(11) NOT NULL, `user_id` int(11) DEFAULT NULL, `wish_like` int(11) DEFAULT '0', PRIMARY KEY (`like_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; CREATE TABLE `tbl_user` ( `user_id` int(11) NOT NULL...
select 'net.squarelabs.sqorm.model.Customer' as classpath, hex(c.`CustomerId`) as `CustomerId`, c.name, c.version from `Customer` c where c.`CustomerId`=unhex(@CustomerId) ; select 'net.squarelabs.sqorm.model.Order' as classpath, o.order_id, hex(o.customer_id) as customer_id, o.version from `Customer` ...
DROP TABLE IF EXISTS articles; CREATE TABLE articles ( id INTEGER PRIMARY KEY AUTOINCREMENT, title STRING NOT NULL, text STRING NOT NULL );
# What's the most expensive listing? What else can you tell me about the listing? # https://www.screencast.com/t/aBohwJadN SELECT * FROM listings WHERE listings.price = (SELECT MAX(listings.price) FROM listings) # What neighborhoods seem to be the most popular? # https://www.screencast.com/t/pmn37pC5XU SE...
-- phpMyAdmin SQL Dump -- version 4.9.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Dec 02, 2019 at 03:41 AM -- Server version: 10.4.8-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 @OLD...
SELECT ROUND(SUM([ORDER DETAILS].UnitPrice * [ORDER DETAILS].Quantity),2) AS Total, Region.RegionDescription FROM Orders INNER JOIN [Order Details] ON Orders.OrderID = [Order Details].OrderID INNER JOIN Employees ON Orders.EmployeeID = Employees.EmployeeID INNER JOIN EmployeeTerritories ON Employees.EmployeeID = Emplo...
/* Formatted on 21/07/2014 18:38:19 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCRE0_WEB_DATA_1 ( TODAY_FLG, FLG_ACTIVE, ID_DPER, COD_ABI_ISTITUTO, COD_ABI_CARTOLARIZZATO, COD_NDG, COD_SNDG, COD_GRUPPO_ECONOMICO, COD_GRUPPO_LEGAME, FLG_GRUPPO_ECONOMICO, FLG_GRUP...
-- phpMyAdmin SQL Dump -- version 4.9.5deb2 -- https://www.phpmyadmin.net/ -- -- Hôte : localhost:3306 -- Généré le : ven. 04 juin 2021 à 15:42 -- Version du serveur : 8.0.25-0ubuntu0.20.04.1 -- Version de PHP : 7.4.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:...
/* Navicat Premium Data Transfer Source Server : piggynote_mysql Source Server Type : MySQL Source Server Version : 50148 Source Host : bdm-018.hichina.com Source Database : bdm0180543_db Target Server Type : MySQL Target Server Version : 50148 File Encoding : utf-8 Da...
-- phpMyAdmin SQL Dump -- version 5.0.3 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jul 20, 2021 at 10:57 AM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.2.34 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIE...
DROP TABLE IF EXISTS `#__actions`; DROP TABLE IF EXISTS `#__painters`; DROP TABLE IF EXISTS `#__exhibitions`; DROP TABLE IF EXISTS `#__annexes`;
-- MySQL dump 10.13 Distrib 5.7.17, for macos10.12 (x86_64) -- -- Host: ssddb.ck6ywww2iqip.sa-east-1.rds.amazonaws.com Database: DataWarehouse -- ------------------------------------------------------ -- Server version 5.7.23-log /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_C...
/* * Weekly report for the year of the count of some column for PostgreSQL * Replace `date_added` with column name, `ratings` with table name * and `2015` with the year you want the report for */ SELECT extract(week FROM date_added) :: bigint AS week, count(*) FROM ratings WHERE extract(YEAR FROM date_adde...
delete from "UserType"; /* Data for the 'public.UserType' table (Records 1 - 5) */ INSERT INTO public."UserType" ("UserTypeID", "Name", "Description", "IsActive", "IsDeleted", "IsGlobal", "IsPrincipal", "IsSecondary") VALUES (E'9e8ca436-2139-11e4-a37d-8771a20de3d2', E'User', E'User', True, False, True, True, True); ...
-- phpMyAdmin SQL Dump -- version 4.6.6deb5 -- https://www.phpmyadmin.net/ -- -- Client : localhost:3306 -- Généré le : Ven 07 Décembre 2018 à 16:01 -- Version du serveur : 5.7.24-0ubuntu0.18.04.1 -- Version de PHP : 7.2.10-0ubuntu0.18.04.1 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!401...
create database msis; USE msis; DROP TABLE IF EXISTS Comments; CREATE TABLE Comments ( id int PRIMARY KEY AUTO_INCREMENT, commentText text not NULL ); INSERT INTO Comments (commentText) VALUES ("I have something important to say"), ("I have no idea what is going on"), ("D&S is hard"); select * from Comments;...
-- phpMyAdmin SQL Dump -- version 4.4.14 -- http://www.phpmyadmin.net -- -- Host: 127.0.0.1 -- Gegenereerd op: 13 jan 2017 om 20:36 -- Serverversie: 5.6.17 -- PHP-versie: 5.6.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!4010...
SELECT country,count(*) FROM customer c, address a,city cty,country ct WHERE c.address_id = a.address_id AND a.city_id = cty.city_id AND cty.country_id = ct.country_id GROUP BY country HAVING count(*) > 10 AND count(*) < 20 ORDER BY count(*) DESC;
/* Created: 05.03.2016 Modified: 22.05.2016 Model: PostgreSQL 9.2 Database: PostgreSQL 9.2 */ -- Create tables section ------------------------------------------------- -- Table poll CREATE TABLE "poll"( "id" BigSerial NOT NULL, "name" Varchar NOT NULL, "description" Varchar, "istest" Boolean DEFAULT true NOT N...
-- t_face_server_dep DROP TABLE IF EXISTS t_face_server_dep; CREATE TABLE t_face_server_dep ( id bigint NOT NULL AUTO_INCREMENT, server_id bigint NOT NULL COMMENT '服务器id', department_id char(36) NOT NULL COMMENT '部门id', add_time timestamp NOT NULL default CURRENT_TIMESTAMP, update_time timestamp NOT NULL def...
create table user ( id int auto_increment, password varchar(50), email varchar(50), creation datetime, active bit , wronglogin int , constraint PK_user primary key (id) ); create table place ( id int auto_increment, creation datetime, code varchar(250), estateagency varchar(250), description varcha...
insert into usr(username, password, active, name, surname, avatar, email) values('admin', 'admin', true, 'Тома', 'Рокмин', 'defaultAvatar.jpg', 'tomarokmin@yandex.ru'); insert into user_role (user_id, roles) values (1, 'USER'), (1, 'ADMIN');
drop table Users create sequence pp start with 1 increment by 1 delete from SETUP where type='Standard' select * from SETUP update SETUP set type = 'Standard' where type ='Standard'; select * from inventory update USERS s set s.U_TYPE = 'Admin' select * from INVENTORY; insert into INVENTORY values (44,'HD...
-- -- PostgreSQL database dump -- SET client_encoding = 'UTF8'; SET standard_conforming_strings = off; SET check_function_bodies = false; SET client_min_messages = warning; SET escape_string_warning = off; SET search_path = public, pg_catalog; SET default_tablespace = ''; SET default_with_oids = false; -- -- Name:...
# ';' 을 잊지말자 SELECT S.NAME, G.GRADE, S.MARKS FROM STUDENTS S, GRADES G WHERE S.MARKS >= G.MIN_MARK AND S.MARKS <= G.MAX_MARK AND G.GRADE >= 8 ORDER BY G.GRADE DESC, S.NAME; SELECT NULL,G.GRADE,S.MARKS FROM STUDENTS S, GRADES G WHERE S.MARKS >= G.MIN_MARK AND S.MARKS <= G.MAX_MARK AND G.GRADE < 8 ORDER BY G.GRADE DE...
# 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; #----------------------------------------------------------------------------- #-- sf_tag #----------------------------------------------------------------------------- ...
alter table project add media text[]; alter table project add image text NOT NULL; alter table project add map geometry; alter table project drop photos; comment on column project.media is 'List of project video/image urls'; comment on column project.image is 'Main project image url (presented on project list)'; comme...
DELETE FROM info.unit_patron_discounts WHERE unit_patron_uid IN (SELECT unit_x_patrons.id FROM info.unit_x_patrons JOIN setup.units ON unit_x_p...
-- phpMyAdmin SQL Dump -- version 4.8.3 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 01-12-2019 a las 14:11:32 -- 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"; ...
CREATE TABLE [wms].[productos_unidades] ( [nivel] INT NOT NULL, [alto] DECIMAL (12, 4) NOT NULL, [ancho] DECIMAL (12, 4) NOT NULL, [factor_conversion] INT NOT NULL, ...
UPDATE MEDICO_TB SET TELEFONE_COM = NULL, TELEFONE_CEL = '94712-2344' WHERE ID = 3 DELETE MEDICO_TB WHERE ID = 2 SELECT * FROM MEDICO_TB
ALTER TABLE `users_sessions` CHANGE COLUMN `cIP` `cIP` INT NULL DEFAULT '0' AFTER `cReason`;
CREATE DATABASE chat; USE chat; CREATE TABLE usernames ( id INT PRIMARY KEY AUTO_INCREMENT, username VARCHAR(250) NOT NULL, UNIQUE (username) ); CREATE TABLE rooms ( id INT PRIMARY KEY AUTO_INCREMENT, room VARCHAR(250) NOT NULL, UNIQUE (room) ); CREATE TABLE messages ( id INT PRIMARY KEY AUTO_INCREMEN...
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; CREATE TABLE IF NOT EXISTS `author` ( `aut_id` varchar(8) COLLATE latin1_general_ci NOT NULL DEFAULT '', `aut_name` varchar(50) COLLATE latin1_general_ci NOT NULL DEFAULT '', `country` varchar(25) COLLATE latin1_general_ci NOT NULL DEFAULT '', `home_city` varchar(25) COLLATE l...
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Hôte : 127.0.0.1 -- Généré le : ven. 05 juin 2020 à 09:16 -- Version du serveur : 5.7.17 -- Version de PHP : 5.6.30 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
/*创建ahub数据库*/ CREATE DATABASE ahub; /*使用ahub数据库*/ USE ahub; /*组织表*/ DROP TABLE IF EXISTS `org_organization`; CREATE TABLE `org_organization` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键id', `gmt_create` datetime NOT NULL COMMENT '创建时间', `gmt_modified` datetime NOT NULL COMMENT '修改时间', `name`...
-- phpMyAdmin SQL Dump -- version 4.1.14 -- http://www.phpmyadmin.net -- -- Värd: 127.0.0.1 -- Tid vid skapande: 19 mars 2015 kl 08:31 -- Serverversion: 5.5.23 -- PHP-version: 5.5.12 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*...
-- phpMyAdmin SQL Dump -- version 4.9.0.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Waktu pembuatan: 25 Jan 2021 pada 08.26 -- Versi server: 10.4.6-MariaDB -- Versi PHP: 7.3.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHAR...
drop materialized view STK_SEARCH_MVIEW; create materialized view STK_SEARCH_MVIEW refresh complete on demand next sysdate + 2/24 as select * from stk_earning_search_view union all select code,name,market,f9,null as hot,null as industry,null as main_industry,null as my_industry,null as fn_date,null as roe, null as cl...
CREATE TABLE user ( id INT NOT NULL AUTO_INCREMENT, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, email_address VARCHAR(255) NOT NULL, currency VARCHAR(3) NOT NULL, country VARCHAR(3) NOT NULL, deleted BOOLEAN NOT NULL DEFAULT FALSE, creation_date TIMESTAMP NOT NULL DEFAULT CURRENT_...
/* 형식: SELECT (값, 컬럼(항목)명, 함수, SUB QUERY) FROM (테이블명, SUB QUERY) */ SELECT * FROM EMPLOYEES; SELECT * FROM TAB; SELECT employee_id, first_name, salary FROM EMPLOYEES; SELECT employee_id, first_name, salary * 12 FROM EMPLOYEES; -- ALIAS SELECT employee_id AS 사원번호, salary as 월급, salary * 12 "일년치...
SELECT *, (mean - LEAD(mean) OVER (ORDER BY variation_name DESC)) / NULLIF(LEAD(mean) OVER (ORDER BY variation_name DESC),0) AS lift FROM ( SELECT variation_name, SUM({{ outcome }}) / COUNT (anonymous_id)::numeric AS mean FROM modeanalytics.demo_experiment_results WHERE ex...
create or replace package app_util /** * Project: app_util <br/> * Description: This package will hold base methods for other packages, types, functions * or produres.<br/> * Features:<br/> * <pre> * 1. manipulate string * 2. manipulate table * 3. manipulate date and time * 4. manipulate dictionary * 5. manip...
CREATE TABLE Vehicle( registrationNumber char(10) UNIQUE, color varchar(10), slotNumber int PRIMARY KEY );
# Create and use database if it not exists CREATE DATABASE IF NOT EXISTS songdb DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci; USE songdb; # Set names to utf-8 SET NAMES utf8; # Create the authors table CREATE TABLE songdb.authors ( id INT(11) PRIMARY KEY AUTO_INCREMENT NOT NULL, name VARCHAR(63)...
/* Script Name: Chapter 8 Justlee books store Developer: Tu Tong Date: October 27, 2017 Purpose: Restricing rows and sorting data */ -- Query perform search for FL state SELECT lastname, state FROM customers WHERE state = 'FL'; -- search for customer 1010 SELECT * FROM customers WHERE cust...
set @index_exists := (SELECT COLUMN_KEY FROM `information_schema`.`COLUMNS` WHERE TABLE_NAME = 'nagios_logentries' AND COLUMN_NAME = 'logentry_data' LIMIT 1); set @sqlstmt := if( @index_exists = '', 'select ''INFO: index did not exist''', 'ALTER TABLE `nagios_logentries` DROP INDEX `logentry_data`'); prepare stmt from...
-- 데이터베이스 생성 CREATE DATABASE IF NOT EXISTS wedul DEFAULT CHARACTER SET utf8mb4;
DROP DATABASE IF EXISTS simplecoin; DROP DATABASE IF EXISTS simplecoin_testing; CREATE USER simplecoin WITH PASSWORD 'testing'; CREATE DATABASE simplecoin; GRANT ALL PRIVILEGES ON DATABASE simplecoin to simplecoin; -- Create a testing database to be different than dev CREATE DATABASE simplecoin_testing; GRANT ALL PRIVI...
SELECT 'Dehtiarov' student FROM DUAL;
select ao.animal_id , ao.name from animal_outs ao join animal_ins ai on ao.animal_id = ai.animal_id where 1 = 1 and ao.datetime < ai.datetime order by ai.datetime ;
ALTER PROC [Hr].[GetPersonHealthCheck] @pid INT AS BEGIN SELECT *, (STUFF((SELECT ',' + CONVERT(VARCHAR(2),c1.HealthStdId) FROM [Hr].[PersonHealthStd] C1 WHERE c1.PersonHealthCheckId = hc.Id FOR XML PATH('')),1,1,'')) AS [StandardIds] FROM [Hr].[PersonHealthCheck] hc WHERE PersonId =@pid END
select aff_name ,count(distinct case when z.low >= '7.7' then enterprise_id else null end) as "MVPs" ,count(distinct case when ctbn_amt is not null and pay_period_dt > '2016-01-01' then enterprise_id else null end) as "Contbs" ,count(distinct enterprise_id) from analytics.members left join enterprise.pac_contributions ...
-- 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_DIVIS...
CREATE DATABASE catmash; CREATE TABLE `catmash`.`cat` ( `SCORE` INT NULL, `URL` VARCHAR(45) NULL, `ID` VARCHAR(45) NOT NULL, PRIMARY KEY (`ID`)); ALTER TABLE `catmash`.`cat` CHANGE COLUMN `URL` `URL` LONGBLOB NULL DEFAULT NULL ;
CREATE TABLE "LOCATION_DETAILS" ( "UID" integer NOT NULL, "COUNTRY" "char", "STATE" "char", "COUNTY" "char", "LATITUDE" double precision, "LONGITUDE" double precision, CONSTRAINT "LOCATION_DETAILS_pkey" PRIMARY KEY ("UID") ) ; CREATE TABLE "LOCATION_STATS" ( "UID" integer NOT NULL, ...
/* Navicat Premium Data Transfer Source Server : test Source Server Type : MySQL Source Server Version : 100129 Source Host : localhost:3306 Source Schema : test Target Server Type : MySQL Target Server Version : 100129 File Encoding : 65001 Date: 25/04/2019 00:22:54...
# Sauvegarde infos client UPDATE `client` SET `entreprise_client` = :entreprise WHERE `pk_client` = :client ;
SELECT * FROM Proyectos;
use jade; # Employee insert into employee (employeeSeq, lastName, firstName) values (1, 'Cornelious-Smith', 'Bessie'); insert into employee (employeeSeq, lastName, firstName) values (2, 'Varverakis', 'Michael'); insert into employee (employeeSeq, lastName, firstName) values (3, 'Jevita', 'Anthony'); insert into ...
# Task 3: Last month riders breakdown by Age and Gender for New York SELECT (2018 - birth_year) AS age, gender, COUNT(*) AS count_riders, 'New York' AS location FROM `bigquery-public-data.new_york_citibike.citibike_trips` WHERE starttime > ( SELECT DATE_SUB(DATE(MAX(starttime)),INTERVAL 1 MONTH) ...
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Gegenereerd op: 24 okt 2017 om 09:28 -- Serverversie: 10.1.26-MariaDB -- PHP-versie: 7.1.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACT...
PostgreSQL nie jest case-sensitive # wyjątek: identyfikatory ujęte w cudzysłowy "" są case-sensitive wpisywane identryfikatory nieujęte w cudzysłowy są zamieniane na pisane małymi literami 'string' escapowanie stringów: e'string' - w escapowanym stringu można używać m.in.: \b - backspace \f - feed \n ...
DROP TABLE IF EXISTS `XXX_papoo_news_imp_lang`; ##b_dump## CREATE TABLE `XXX_papoo_news_imp_lang` ( `news_imp_id` int(11) NOT NULL DEFAULT '0', `news_imp_lang_id` int(11) NOT NULL DEFAULT '0', `news_imp_imp` text NOT NULL, `news_imp_imp_html` text NOT NULL ) ENGINE=MyISAM DEFAULT CHARSET=utf8; ##b_dump## INSER...
CREATE TABLE `admin` ( `admin_id` int(11) NOT NULL auto_increment, `username` varchar(20) NOT NULL, `password` varchar(14) NOT NULL, PRIMARY KEY (`admin_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; insert into `db_healthcare`.`admin`(`admin_id`,`username`,`password`) values (1,'Admin','admin');
CREATE TABLE IF NOT EXISTS `contact_messages` ( id INT PRIMARY KEY AUTO_INCREMENT, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, phone VARCHAR(255) NOT NULL, content VARCHAR(255) NOT NULL );
SELECT t.id , name FROM teacher AS t RIGHT JOIN university AS u ON t.id=u.Teacher_id WHERE u.Campus='multan' query to print teacher name and id who are in multan ---------------------------- SELECT * FROM `teacher` WHERE CNIC ='1234' quer to print teacher detail for cnic=1234. ---------------------------- SELECT * ...
SELECT project.name from project where id_dep = 1;
SELECT * FROM perks WHERE perks.class_id = 6
#################################################### DROP DATABASE IF EXISTS InventoryTest; CREATE DATABASE IF NOT EXISTS InventoryTest; USE InventoryTest; CREATE TABLE Departments ( DepartmentId int NOT NULL AUTO_INCREMENT, DepartmentName varchar(100) NOT NULL, PRIMARY KEY(DepartmentId) ); CREATE TABLE Locations ...
-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.5.5-10.4.19-MariaDB /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@CO...
/* Formatted on 17/06/2014 18:09:05 (QP5 v5.227.12220.39754) */ CREATE OR REPLACE FORCE VIEW MCRE_OWN.V_MCREI_RIO_RICHPROR_CNS_DB ( REC ) AS SELECT DISTINCT r.cod_abi_cartolarizzato || '-' || r.cod_ndg FROM v_mcre0_app_alert_rio_richpror r, t_mcrei_app_delibere p WHERE p.cod_abi(+) = r.cod_abi_cartol...
create table table21 ( column1 varchar(256) );
IF(OBJECT_ID(N'contest_participations', N'U') IS NULL) BEGIN CREATE TABLE contest_participations( user_id INT NOT NULL, contest_id INT NOT NULL, score INT, placement INT CHECK(placement > 0), FOREIGN KEY (user_id) REFERENCES users(id), FOREIGN KEY (contest_id) REFERENCES contests(id), PRIMARY KEY (user_id, co...
 /*-------4.业务表管理--------*/ /* num: 序号 modelID: 模块ID tableID: 表ID, tableCaption: 表描述, className: 业务类名称, Responsible: 责任人, remark: 备注 */ CREATE TABLE frm_systable ( num number, modelID varchar(50) , tableID varchar(50) not null primary key, ...
-- phpMyAdmin SQL Dump -- version 4.5.1 -- http://www.phpmyadmin.net -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 22-11-2016 a las 22:40:13 -- Versión del servidor: 10.1.10-MariaDB -- Versión de PHP: 5.6.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT...
SELECT DATE_TRUNC('day',o.occurred_at) AS date, r.name AS region, we.channel, SUM(o.gloss_qty) AS gloss_units, SUM(o.poster_qty) AS poster_units, SUM(o.standard_qty) AS standard_units, SUM(o.total_amt_usd) AS total_sales_usd FROM demo.accounts a JOIN demo.orders o ON o.account_id = a.id AND o.occurred_at < '2017-01-01'...
SELECT SalesOrderHeader.SubTotal, SalesOrderHeader.Status, SalesOrderDetail.UnitPrice, Product.Name, Product.Size, Vendor.Name FROM Sales.salesorderheader, Sales.SalesOrderDetail, Purchasing.ProductVendor, Purchasing.Vendor, Production.Product, Purchasing.ShipMethod WHERE Sales.SalesOrderHeader.SalesOrderID = Sales.S...
-- Not used for SQLAnywhere SELECT p.name AS [PropertyName], p.value AS [PropertyValue], SQL_VARIANT_PROPERTY(p.value,'BaseType') AS [PropertyBaseType], SQL_VARIANT_PROPERTY(p.value,'MaxLength') AS [PropertyMaxLength], SQL_VARIANT_PROPERTY(p.value,'Precision') AS [PropertyPrecision], SQL_VARIAN...
SET NAMES UTF8; DROP database IF EXISTS fashionShop; create database fanke CHARSET=UTF8; USE fashionShop; create table user( user_id int primary key auto_increment, user_name varchar(9), user_pwd varchar(12), user_email varchar(32), user_phone varchar(11), sex varchar(1), user_safequestion varc...
SELECT e1.eno, e1.manager, e2.eno FROM employee e1, employee e2 WHERE e1.manager = e2.eno; SELECT e1.eno, e1.manager, e2.eno FROM employee e1, employee e2 WHERE e1.manager = e2.eno(+); SELECT e1.eno, e1.manager, e2.eno FROM employee e1, employee e2 WHERE e1.manager(+) = e2.eno; SELECT e1.eno, e1.ename, e1.manager...
-- Table - orders -- 1. Create a table called orders that records: order_id, person_id, product_name, product_price, quantity. CREATE TABLE orders ( order_id SERIAL PRIMARY KEY, person_id INTEGER, product_name VARCHAR(80), product_price INTEGER, quantity INTEGER ); -- 2. Add 5 orders to the orders table. --...
CREATE TABLE USUARIO ( id IDENTITY PRIMARY KEY, email VARCHAR(255), senha VARCHAR(200), perfil CHAR(1) ); CREATE TABLE DATASOURCECONFIG ( id IDENTITY PRIMARY KEY, driverclassname VARCHAR(255), url VARCHAR(255), name VARCHAR(255), username VARCHAR(255), password VARCHAR(255), tenant_id INT, initialize BOOLE...
-- phpMyAdmin SQL Dump -- version 5.1.0 -- https://www.phpmyadmin.net/ -- -- Máy chủ: localhost:3306 -- Thời gian đã tạo: Th9 03, 2021 lúc 03:36 PM -- Phiên bản máy phục vụ: 5.7.33 -- Phiên bản PHP: 7.4.19 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTE...
/* Drop Tables */ DROP TABLE announcement CASCADE CONSTRAINTS; DROP TABLE Files CASCADE CONSTRAINTS; DROP TABLE pointslog CASCADE CONSTRAINTS; DROP TABLE posts CASCADE CONSTRAINTS; DROP TABLE replies CASCADE CONSTRAINTS; DROP TABLE userinfo CASCADE CONSTRAINTS; /* Drop Sequences */ DROP SEQUENCE SEQ...
-- -- PostgreSQL database dump -- -- Dumped from database version 9.5.3 -- Dumped by pg_dump version 9.5.3 SET statement_timeout = 0; SET lock_timeout = 0; SET client_encoding = 'UTF8'; SET standard_conforming_strings = on; SET check_function_bodies = false; SET client_min_messages = warning; SET row_security = off; ...
/* Navicat Premium Data Transfer Source Server : hi Source Server Type : MySQL Source Server Version : 80011 Source Host : localhost:3306 Source Schema : news1 Target Server Type : MySQL Target Server Version : 80011 File Encoding : 65001 Date: 25/07/2018 23:32:56 */...
/* ################################################################################ Migration script to create: - IS_CLOSEST_GENE column in GENOMIC_CONTEXT Designed for execution with Flyway database migrations tool; this should be automatically run to completely generate the schema that is out-of-the-box compatibil...
-- SCRIPT INFORMATION -- -- Types: mysql mariadb -- Version: 1 -- Upgrades: 0 -- SCRIPT INFORMATION -- START TRANSACTION; SET foreign_key_checks = 0; DROP TABLE IF EXISTS sapphire_tower CASCADE; DROP TABLE IF EXISTS sapphire_tower_block CASCADE; CREATE TABLE sapphire_tower ( tower_id BIGINT ...
USE SoftUni --EXCERCISE 1 SELECT TOP(5) e.EmployeeID, e.JobTitle, a.AddresSID, a.AddressText FROM Employees AS e LEFT JOIN Addresses AS a ON a.AddressID = e.AddressID ORDER BY a.AddressID --EXCERCISE 2 SELECT TOP(50) e.FirstName,e.LastName,t.[Name] AS Town,a.AddressText FROM Employees AS e LEFT JOIN Addresses AS a ...
SELECT count(CLIENTES."TIPO_VEHICULO") FROM "ADMINISTRADOR"."CLIENTES" CLIENTES WHERE TIEMPO=0
-- Count orphan records -- change parent_table, child_table, and key accordingly SELECT COUNT(*) as n_orphans FROM child_table c WHERE NOT EXISTS (SELECT key FROM parent_table p WHERE p.key = c.key); -- Count replication errors -- change original_table, derived_table, key, and field_name SELECT ...
CREATE DATABASE IF NOT EXISTS `project_history` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `project_history`; -- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64) -- -- Host: localhost Database: project_history -- ------------------------------------------------------ -- Server version 5.7.17-log /*!40101 S...
-- Drops the blogger if it exists currently -- DROP DATABASE IF EXISTS crm_db; -- Creates the "blogger" database -- CREATE DATABASE crm_db; USE crm_db;
-- User insert into user(user_id,age,email,name,role) values(1001,25,'amitemail@gmail.com','Amit','Admin'); insert into user(user_id,age,email,name,role) values(1002,25,'ajeetemail@gmail.com','Ajeet','User'); insert into user(user_id,age,email,name,role) values(1003,26,'rakeshemail@gmail.com','Rakesh','User'); insert ...
SELECT 'O PREÇO DO CURSO ' + NOME_CURSO + ' É DE R$ ' + CAST(PRECO_CURSO AS VARCHAR(6)) FROM TB_CURSOS WHERE ID_PROFESSOR = 2 SELECT 'A DATA DE LANÇAMENTO ' + CONVERT(VARCHAR(20), DATA_CRIACAO,103) FROM TB_CURSOS WHERE ID_CURSO = 102
-- Table: season_rankings -- DROP TABLE season_rankings; CREATE TABLE season_rankings ( season_ranking_id serial NOT NULL, season_year smallint NOT NULL, team_id character varying(3) NOT NULL, off_pts double precision NOT NULL, off_pass_yds double precision, off_pass_tds double precision, off_rush_yds d...