text stringlengths 6 9.38M |
|---|
CREATE TABLE films (
id INTEGER PRIMARY KEY AUTOINCREMENT,
title TEXT,
director TEXT,
description TEXT,
year INTEGER,
rating REAL
);
-- seed data
INSERT INTO films (title, director, year, rating) VALUES ('Mank', 'David Fincher', 2020, 3);
INSERT INTO films (title, director, year, rating) VALUES ('Nomadland... |
CREATE TABLE movie_details(
movie_id INT NOT NULL AUTO_INCREMENT,
movie_title VARCHAR(100) NOT NULL,
release_date DATE,
PRIMARY KEY ( movie_id )
);
CREATE TABLE reviews(
review_id INT NOT NULL AUTO_INCREMENT,
movie_id INT ,
comments VARCHAR(100) NOT NULL,
rating DECIMAL(5,2) defa... |
drop sequence if exists uploaded_file_seq;
create sequence uploaded_file_seq;
SELECT setval('uploaded_file_seq', (SELECT MAX(id) FROM uploaded_file));
|
Select * from actor;
Alter table actor
add column genero_actor char(1);
Alter table actor
Drop column genero_actor |
INSERT INTO cars (name) VALUES (?); |
-- 1) What grades are stored in the database?
-- SELECT * FROM Grade;
-- 2) What emotions may be associated with a poem?
-- SELECT * FROM Emotion;
-- 3) How many poems are in the database?
-- COUNT() returns how many rows match that criteria
/*SELECT COUNT(p.id) as PoemTotal
FROM Poem p;*/
-- 4) Sort author... |
/*Gzelle 05272015 SR4562*/
SET SERVEROUTPUT ON
DECLARE
v_exist NUMBER := 0;
BEGIN
SELECT 1
INTO v_exist
FROM cpi.giis_menu_line
WHERE menu_line_cd = 'CA';
IF v_exist = 1
THEN
DBMS_OUTPUT.put_line ('CA-CASUALTY already existing in GIIS_MENU_LINE.');
END IF;
EXCEPTION
WHEN NO_DA... |
INSERT INTO account(name, password, editor) VALUES ('test', 'test', false );
INSERT INTO account(name, password, editor) VALUES ('soares', '123', true);
INSERT INTO account(name, password, editor) VALUES ('jaime', '123', true);
INSERT INTO account(name, password, editor) VALUES ('patife', '123', false);
INSERT INTO art... |
-- phpMyAdmin SQL Dump
-- version 4.6.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Dec 14, 2016 at 09:42 AM
-- Server version: 5.5.53-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.20
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT... |
set name utf8;
set foreign_key_checks=0;
drop database if exists openconnect;
create database openconnect;
use openconnect;
create table user(
id int,
user_name varchar(255),
password varchar(255)
);
insert into user values (1,"taro","123");
insert into user values (2,"jiro","123");
insert into user values (3,"hana... |
--------------------------------------------------------
-- File created - Friday-January-24-2020
--------------------------------------------------------
--------------------------------------------------------
-- DDL for Function GENERATE_LIQUID_FILE_MAIN
--------------------------------------------------------
... |
CREATE or replace TRIGGER Tri_Update_HrmMessager after update ON HrmResource
for each row
Declare
id_1 integer;
oldloginid varchar(100);
newloginid varchar(100);
groupname integer;
groupcount integer;
begin
oldloginid := :old.loginid;
newlogini... |
INSERT INTO `teacher` VALUES (1, 'zhangsan', '张三2', '讲师');
INSERT INTO `teacher` VALUES (2, 'lisia', '李四三', '讲师');
INSERT INTO `teacher` VALUES (3, 'wangwu', '王五三', '讲师');
INSERT INTO `teacher` VALUES (4, 'fffa', '是否三9', '讲师');
INSERT INTO `teacher` VALUES (5, '5', '5', '讲师');
INSERT INTO `teacher` VALUES (6, '6',... |
-- phpMyAdmin SQL Dump
-- version 3.4.10.1deb1
-- http://www.phpmyadmin.net
--
-- Servidor: localhost
-- Tiempo de generación: 16-06-2014 a las 21:35:18
-- Versión del servidor: 5.6.19
-- Versión de PHP: 5.3.10-1ubuntu3.11
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SE... |
--2
/*Añadir a la tabla ALUMNOS dos columnas: SEXO e IMPORTE.
Definir la columna SEXO con la restricción NOT NULL. Sólo podrán introducir los valores M o F.
La columna IMPORTE numerica entera de precisión 10 con dos decimales. Por defecto, contendrá el valor 0 .*/
ALTER TABLE ALUMNOS ADD(
SEXO VARCHAR2(1... |
Alter table studentemployee add constraint foreign key(student_id) references student(rollno) |
with orders as (
select * from {{ ref('orders') }}
),
line_items as (
select
l_orderkey as order_key,
l_partkey as part_key,
l_suppkey as supplier_key,
l_linenumber as order_line_number,
l_quantity as quantity,
l_extendedprice{{ money() }} as extended_price,
l_discount{{ money() ... |
SELECT * FROM it_park_user;
SELECT * FROM it_park_user WHERE age = 20;
SELECT * FROM it_park_user WHERE age = 20 AND name = 'Ilyas';
SELECT * FROM it_park_user ORDER BY age;
SELECT (name) FROM it_park_user ORDER BY age;
SELECT (name, model) FROM auto a, it_park_user u WHERE a.owner_id = u.id;
SELECT COUNT(*)
FRO... |
-- MySQL dump 10.13 Distrib 8.0.15, for Win64 (x86_64)
--
-- Host: localhost Database: warenkorb
-- ------------------------------------------------------
-- Server version 5.5.5-10.3.14-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SE... |
-- phpMyAdmin SQL Dump
-- version 4.5.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 22, 2015 at 09:55 AM
-- Server version: 10.1.8-MariaDB
-- PHP Version: 5.6.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLI... |
insert into invoice_item_type (description) values ('Sales Invoice Item');
insert into invoice_item_type (description) values ('Purchase Invoice Item');
insert into invoice_item_type (description) values ('Invoice Adjustment');
insert into invoice_item_type (description) values ('Invoice Adjustment');
insert into invoi... |
insert into mgt_organizations(org_id, name, description) values (1, 'JBB TEST ORG', 'JBB test');
insert into `jbbserver`.`mgt_accounts` ( `account_id`, `username`,`nickname`, `phone_number`, `jbb_user_id`, `password`, `org_id`, `creator`, `creation_date`) values (1, 'test org admin','test org admin', '13510000001', n... |
-- Buildings
------------------------------
INSERT INTO Buildings
(Type, BuildingClass, XBuiltTriggersIdeologyChoice, Cost, GoldMaintenance, PrereqTech, ArtDefineTag, SpecialistType, SpecialistCount, MinAreaSize, ConquestProb, HurryCostModifier, Help, Description, Civilopedia, Strategy, IconAtlas, PortraitIndex... |
# 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;
-- ---------------------------------------------------------------------
-- categorie
-- ---------------------------------------------------------------------
DROP TABLE... |
DROP PROCEDURE CPI.EXTRACT_LATEST_EN_DATA;
CREATE OR REPLACE PROCEDURE CPI.Extract_Latest_En_Data (p_expiry_date gicl_claims.expiry_date%TYPE,
p_incept_date gicl_claims.expiry_date%TYPE,
p_loss_date gicl_claims.loss_date%TYPE,
... |
--sql for authentication
BEGIN TRANSACTION;
CREATE TABLE Users (socialId text not null, bearId text not null);
CREATE TABLE Authentication (authId text not null, username text not null, password text not null);
CREATE TABLE Bears (bearId text not null, bearUsername text not null, bearAvatarId text not null);
-- cur... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 14, 2021 at 04:51 PM
-- Server version: 10.4.11-MariaDB
-- 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... |
/* Formatted on 04/02/2014 09:00:08 a.m. (QP5 v5.163.1008.3004) */
--validacion 1
-- registros con oficinas erroneas
SELECT DISTINCT poliza,
cd_sucursal,
--cd_ramo,
nu_poliza,
nu_certificado,
cod_producto,
suc... |
/*
Navicat MySQL Data Transfer
Source Server : mysql
Source Server Version : 50722
Source Host : localhost:3306
Source Database : lzdb
Target Server Type : MYSQL
Target Server Version : 50722
File Encoding : 65001
Date: 2018-05-28 19:20:14
*/
SET FOREIGN_KEY_CHECKS=0;
-- --------... |
--===================================================================================|
-- SQL_TABLE.SQL
--===================================================================================|
/* -----------[ ROLE ]
* Create blog database
* Create tables : table_users, table_articles, table_categories, tab... |
-- List the lname of all female employees with super ssn=333445555
SELECT lname FROM Employee
WHERE sex='F' AND superssn=333445555;
-- List ssn and dname of department employees
SELECT ssn, dname FROM Employee, Department
WHERE Employee.dno=Department.dnumber;
-- List ssn and dname of department employees who... |
INSERT INTO DIRECTORY_TABLE(id, NAME) VALUES
(null, "firstDir"); |
insert into qq values (0);
insert into qq values (1);
insert into qq values (2);
insert into qq values (3);
insert into qq values (4);
insert into qq values (5);
insert into qq values (6);
insert into qq values (7);
insert into qq values (8);
insert into qq values (9);
insert into qq values (10);
insert into qq values ... |
SELECT setMetric('OpenMFGServerVersion', '3.1.0RC');
|
delete from HtmlLabelIndex where id=20098
/
delete from HtmlLabelInfo where indexId=20098
/
INSERT INTO HtmlLabelIndex values(20098,'工作人员')
/
INSERT INTO HtmlLabelInfo VALUES(20098,'工作人员',7)
/
INSERT INTO HtmlLabelInfo VALUES(20098,'employee',8)
/
delete from HtmlLabelIndex where id=20388
/
delete from HtmlLabel... |
CREATE KEYSPACE IF NOT EXISTS density WITH replication =
{
'class': 'SimpleStrategy',
'replication_factor': 1
}
AND DURABLE_WRITES = false;
CREATE TABLE IF NOT EXISTS density.points (
zoom int,
x int,
y int,
lat double,
lng double,
primary key ((zoom, x, y), lat, lng)
); |
-- MySQL dump 10.13 Distrib 5.5.53, for Win32 (AMD64)
--
-- Host: localhost Database: math
-- ------------------------------------------------------
-- Server version 5.5.53
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
... |
CREATE SEQUENCE SCHEDULE_SEQ
INCREMENT BY 1
START WITH 1
MINVALUE 1
MAXVALUE 100000;
DROP SEQUENCE SCHEDULE_SEQ;
CREATE TABLE SCHEDULE(
HELPER_ID VARCHAR2(50),
START_TIME NUMBER(3,1),
END_TIME NUMBER(3,1),
AVAIL_DAY NUMBER(1),
CONSTRAINT FK_HELPER_ID_TIMESLOT FOREIGN KEY(HELPER_ID)
REFERENCES HELPER(HELPER_ID)... |
-- WEB-4276 - track forex rates for packages
CREATE TABLE PAYMENT_FX (
CURRENCY VARCHAR(3) NOT NULL,
BASE_CURRENCY VARCHAR(3) NOT NULL DEFAULT 'USD',
SETTLEMENT_DATE DATE NOT NULL,
EXCHANGE_RATE DECIMAL(13,7) NOT NULL,
PRIMARY KEY (CURRENCY, BASE_CURRENCY, SETTLEMENT_DATE)
) charset=utf8##
INSERT INTO PAYM... |
-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- 主机: 127.0.0.1
-- 生成日期: 2019-09-11 00:09:08
-- 服务器版本: 10.1.38-MariaDB
-- PHP 版本: 7.3.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTE... |
-- -- -------------------------------------------------------------------------------
-- -- Zadanie 4
-- -- -------------------------------------------------------------------------------
-- -- -------------------------------------------------------------------------------
-- Section: setting sql_mode
-- -- ----------... |
-- This index is needed when deleting manifests, the cascade will want
-- to delete rows from manifest_index based on the manifest.id. Without
-- this index things get slow.
CREATE INDEX IF NOT EXISTS idx_manifest_index_manifest_id ON manifest_index(manifest_id);
|
declare
v_ProcessorName nvarchar2(255);
v_WorkbasketId integer;
v_NumberOfRecords number;
v_NumberOfCases number;
v_NumberOfTasks number;
v_functionName nvarchar2(255);
v_ErrorCode number;
v_ErrorMessage nvarchar2(255);
v_query varchar(2000);
v_first number;
v_result number;
begin
v_NumberOfReco... |
DROP PROCEDURE CPI.PRE_PRODUCTION_EXTRACT;
CREATE OR REPLACE PROCEDURE CPI.PRE_PRODUCTION_EXTRACT (
p_from_date DATE,
p_to_date DATE,
p_user_id giis_users.user_id%TYPE,
p_message OUT VARCHAR2
)
IS
var_with_invoice_tag gipi_open_liab.with_invoice_tag%TYPE;
var_count... |
-- List the following details of each employee:
--employee number, last name, first name, sex, and salary.
SELECT employees.emp_no,
employees.last_name,
employees.first_name,
employees.sex,
salaries.salary
FROM employees LEFT JOIN salaries
ON employees.emp_no=salaries.emp_no;
-- List first name, l... |
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE table IF NOT EXISTS Users (
UID uuid DEFAULT uuid_generate_v4 () primary key,
fb_id VARCHAR(50) not NULL,
Name VARCHAR(70) not NULL,
Email_Address VARCHAR(255) UNIQUE not NULL,
Phone_Number VARCHAR(50) NULL,
Location VARCHAR(50) NULL,
Profi... |
select nombre,apellido,email,f_nacimiento,cedula,direccion,telefono from registroClientes
|
exec sp_executesql N'/* To prevent any potential data loss issues, you should review this script in detail before running it outside the context of the database designer.*/
BEGIN TRANSACTION
SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_P... |
COL name FOR a15
SELECT *
FROM
(
SELECT name
, (space_limit-space_used)/1024/1024 free_mb
, space_limit/1024/1024 total_mb
, DECODE( NVL( space_used, 0), 0, 0, ceil ( ( space_used / space_limit) * 100) ) PCT_USED
FROM v$recovery_file_dest
ORDER BY name
)
WHERE name IS NOT NULL
UNION ALL
SE... |
-- TABLE IMAGES
CREATE TABLE images(
id INT(6) AUTO_INCREMENT PRIMARY KEY,
filename VARCHAR(200),
title VARCHAR(200),
description VARCHAR(200)
);
INSERT INTO images VALUES ("", "metalas.jpg", "Metalas metalinis", "Ziba kaip reikalas.");
INSERT INTO images VALUES ("", "rankos.jpg", "Rankos", "Kazka labai dirba.... |
--4. Implementați în Oracle diagrama conceptuală realizată: definiți toate tabelele, implementând toate constrângerile de integritate necesare (chei primare, cheile externe etc).
CREATE TABLE Clienti (
id_client NUMBER constraint pk_clienti primary key,
prenume VARCHAR2(50),
nume VARCHAR2(50),
email VARCHAR2(5... |
-- phpMyAdmin SQL Dump
-- version 4.7.4
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Mar 21, 2018 at 09:58 AM
-- Server version: 10.1.29-MariaDB
-- PHP Version: 7.2.0
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
-- --------------------------------------------------------
-- Host: localhost
-- Versión del servidor: 5.7.24 - MySQL Community Server (GPL)
-- SO del servidor: Win64
-- HeidiSQL Versión: 10.2.0.5599
-- --------------------------------------------------------
/... |
CREATE DATABASE yeticave
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE yeticave;
CREATE TABLE categories (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(64) NOT NULL,
character_code VARCHAR(64) NOT NULL UNIQUE
);
CREATE TABLE lots (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,... |
select name as NAME,
MAX(has_food + has_laundary + has_airconditioner + has_tv + has_internet + has_waterheater) AS MaxFacilities
from pg1.pg; |
create table Team (
id bigint identity not null,
name varchar(100) not null,
stadium_id bigint not null,
version bigint not null,
constraint PK_TEAM_ID primary key(id),
constraint FK_TEAM_STADIUM foreign key(stadium_id) references Stadium (id)
);
|
CREATE TABLE user_base
(
id INTEGER NOT NULL PRIMARY KEY,
name VARCHAR(45) NOT NULL,
gender VARCHAR(3) NOT NULL,
age INTEGER NOT NULL,
address VARCHAR(100) NOT NULL,
lvl INTEGER NOT NULL
);
CREATE INDEX user_base_idx1 ON user_base ( id ) ;
CREATE SEQUENCE user_base_seq_id ;
CREATE TABLE user_or... |
CREATE TABLE IF NOT EXISTS copy_ingest_history (
ingest_id text not null, -- unique id for each ingest
discovered_files int, -- the number of files discovered for ingest
processed_files int, -- the number of files discovered for ingest
coverage_start float not null,
coverage_end float not n... |
/*
SQLyog Ultimate v12.09 (64 bit)
MySQL - 5.6.22-log : Database - helpdesk
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_C... |
DROP TABLE IF EXISTS movies;
CREATE TABLE movies (
id serial primary key,
title text not null,
genres varchar(1024)
); |
-- =============================================
-- Proyecto: Sistema SIGEIN 5.0
-- Copyright (c) - Acrux - 2015
-- Author: Juan De Dios Pérez Pedroza
-- CREATE date: 21/09/2015
-- Description: Obtiene los datos de la tabla K_PRUEBA_SECCION
-- =============================================
CREATE PROCEDURE [IDP].[SPE_... |
/*
MySQL Data Transfer
Source Host: localhost
Source Database: mmbook
Target Host: localhost
Target Database: mmbook
Date: 2010-9-13 12:55:52
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for tb_site_article_info
-- ----------------------------
CREATE TABLE `tb_site_artic... |
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 14 Jun 2021 pada 11.49
-- Versi server: 10.4.13-MariaDB
-- Versi PHP: 7.2.32
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@C... |
SELECT CON_ITEM.ITEMID,
CON_ITEM.ITEMDATAID,
CON_ITEM.ISSUBITEM,
CON_ITEM.ITEMROOTID,
CON_ITEM.VERSIONNO,
CON_ITEM.ISLASTVERSION,
CON_ITEM.DATANODEID,
CON_ITEM.ITEMTYPEID,
Con_Itemtype.NAME,
CON_ITEM.COMMONNAME,
CON_ITEM.COMMONSYSTEMNAME,
CON_ITEM.COMMONSYSTEMTYPE,
CON_ITEM.NATIVEAPP,
CON_ITEM... |
-- Create a stored procedure that doesnt include jobs for employees only. Let user put in parameter for first name.
Create Procedure Search_First_Name
@search nvarchar(30) --Parameter
As
Begin
select * from Employee where firstname like @search
End
|
ALTER TABLE liquidacion_item
DROP CONSTRAINT liquidacion_documento_item;
|
-- MySQL dump 10.13 Distrib 5.6.13, for Win64 (x86_64)
--
-- Host: localhost Database: haofu
-- ------------------------------------------------------
-- Server version 5.6.13
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */... |
/*
Navicat MySQL Data Transfer
Source Server : localhost
Source Server Version : 50505
Source Host : localhost:3306
Source Database : akademik
Target Server Type : MYSQL
Target Server Version : 50505
File Encoding : 65001
Date: 2018-01-06 16:10:55
*/
SET FOREIGN_KEY_CHECKS=0;
-- ... |
insert into user(name) values('oscar999'); |
--
-- PostgreSQL database dump
--
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;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgs... |
/* Tabella Cliente */
/* Num: 1 */
INSERT INTO cliente(email, telefono)
VALUES
(
'dscotti@gmail.com', 4215807124
);
/* Num: 2 */
INSERT INTO cliente(email, telefono)
VALUES
(
'maestro_99@gmail.com', 3269438091
);
/* Num: 3 */
INSERT INTO cliente(email, telefono)
VALUES
(
'homer_simpson@gmail.com', 3328481164
);
/* N... |
SELECT createColumn('public', 'womatl', 'womatl_issuewo', 'BOOLEAN', 'FALSE', FALSE);
|
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Hôte : localhost:8889
-- Généré le : lun. 10 mai 2021 à 08:56
-- Version du serveur : 5.7.30
-- Version de PHP : 7.4.9
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Base de données : `facture`
--
-- --------------... |
-- 0505 渠道包漏斗统计
CREATE TABLE mgt_channel_app_funnel (
statistic_date date NOT NULL COMMENT '统计时间',
channel_code varchar(20) NOT NULL COMMENT '渠道编号 ',
login_num int(11) DEFAULT '0' COMMENT '总登录数',
login_num_new int(11) DEFAULT '0' COMMENT '新用户登录数',
login_num_old int(11) DEFAULT '0' COMMENT '老用户登录数',
uv_cnt ... |
INSERT INTO july_2019_leadsandsales (departments, dept_weekly_goals)
VALUES ("D21/22", 2);
INSERT INTO july_2019_leadsandsales (departments, dept_weekly_goals)
VALUES ("D23/59", 3);
INSERT INTO july_2019_leadsandsales (departments, dept_weekly_goals)
VALUES ("D24", 1);
INSERT INTO july_2019_leadsandsales (department... |
rem
rem
Rem Copyright (c) 1996 by Oracle Corporation. All rights reserved.
Rem NAME
Rem privoolk.sql - package of various OWA OPTIMISTIC LOCKING procedures
Rem DESCRIPTION
Rem This file contains one package:
Rem owa_opt_lock - Utitility procedures/functions for use
Rem ... |
grants
current_schemas(true) #show pg_temp,pg_catalog
pg_config --sharedir #show share dir
#show owner of object and grants on it
select c.relkind,u.usename,n.nspname||'.'||relname,relacl from pg_class c left join pg_namespace n on (n.oid=c.relnamespace)
left join pg_user u on (u.usesysid=c.relowner) where n.nspname... |
drop database chat;
CREATE DATABASE chat;
USE chat;
/* Create other tables and define schemas for them here! */
CREATE TABLE users (
id integer primary key not null AUTO_INCREMENT, users text not null
);
insert into users values (1, 'suejung');
CREATE TABLE messages (
/* Describe your table here.*/
id int not ... |
# --- !Ups
create table "TRADE_WALLETS" ("ID" UUID NOT NULL PRIMARY KEY,"ID_ACCOUNT_REF" UUID NOT NULL,"COLOR" VARCHAR NOT NULL,"CREATE_AT" timestamp NOT NULL);
create unique index "IDX_ID_TRADE_WALLETS_REF_TRADE_WALLETS" on "TRADE_WALLETS" ("ID_ACCOUNT_REF");
create table "BALANCE" ("ID" SERIAL NOT NULL PRIMARY KEY... |
alter table obitos add PIS VARCHAR( 14 );
--alter table obitos add CTPS VARCHAR( 7 );
--alter table obitos add CTPS_SERIE VARCHAR( 5 );
--alter table obitos add CTPS_UF VARCHAR( 2 );
--alter table obitos add FAL_LIVRO VARCHAR( 5 );
--alter tab... |
CREATE TABLE Person (
username VARCHAR(16) NOT NULL,
password VARCHAR(30) NOT NULL,
name VARCHAR(30) NOT NULL,
mail VARCHAR(30),
#dateOfBirth DATE,
PRIMARY KEY(username)
);
CREATE TABLE Room (
roomID INT UNSIGNED AUTO_INCREMENT NOT NULL,
capacity INT UNSIGNED NOT NULL,
name VARCHAR(... |
DROP TABLE IF EXISTS users;
CREATE TABLE users (
id INTEGER PRIMARY KEY,
fname TEXT NOT NULL,
lname TEXT NOT NULL
);
DROP TABLE IF EXISTS questions;
CREATE TABLE questions (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
body TEXT NOT NULL,
author_id INTEGER NOT NULL,
FOREIGN KEY (author_id) REFERENCE... |
BEGIN
:PlaceholderResult := '<b>' || f_DOC_getDocumentPath(:documentid) || '</b>';
EXCEPTION
WHEN no_data_found THEN
:PlaceholderResult := 'NONE';
WHEN OTHERS THEN
:PlaceholderResult := 'SYSTEM ERROR';
END; |
/*Table structure for table `ci_sessions` */
DROP TABLE IF EXISTS `ci_sessions`;
CREATE TABLE `ci_sessions` (
`session_id` varchar(40) collate utf8_bin NOT NULL default '0',
`ip_address` varchar(16) collate utf8_bin NOT NULL default '0',
`user_agent` varchar(150) collate utf8_bin NOT NULL,
`last_activ... |
SELECT col_id AS Id,
F_util_getdrtnfrmnow(col_startdate) AS CreatedDuration,
col_startdate AS StartDate,
col_enddate AS EndDate
FROM tbl_util_deploymentlog
ORDER BY col_createddate DESC |
#postgresql
CREATE DATABASE mydb;
# \l
# \c mydb
create table vm1(id int primary key not null, name char(10) not null, memory int not null);
create table sto1(id int primary key not null, name char(10) not null, storage int not null, out_id int references vm1(id));
# \d
# \d vm1
insert into vm1(id, name, memory) values... |
-- a script that uses the hbtn_0d_tvshows database to lists all genres of the show Dexter.
SELECT tv_genres.name FROM tv_shows
INNER JOIN tv_show_genres ON tv_show_genres.show_id = tv_shows.id
INNER JOIN tv_genres ON tv_genres.id = tv_show_genres.genre_id
WHERE tv_shows.title = 'Dexter' ORDER BY tv_genres.name;
|
select distinct resortid , sum(bedroomcount) as TOTALCOUNT
from Cabin
group by resortid
order by resortid; |
DROP TRIGGER IF EXISTS after_delete_image;
DELIMITER ;;
CREATE DEFINER=web@localhost TRIGGER after_delete_image AFTER DELETE ON images FOR EACH ROW
BEGIN
INSERT INTO images_deleted (id, path) VALUES (OLD.id, OLD.path);
END ;;
DELIMITER ;
|
delete from Traversee;
delete from classeVoyage;
delete from BateauVoyage;
delete from port;
delete from Bateau;
delete from Voyage;
delete from classe;
-- port
insert into port (codeport,ville,etat,nom) values ('PMV','Vancouver','CA','Metro Vancouver');
insert into port (codeport,ville,etat,nom) values ('... |
CREATE TABLE `game_code` (
`code_type` tinyint(5) NOT NULL COMMENT '激活码类型',
`code` varchar(255) NOT NULL COMMENT '激活码',
PRIMARY KEY (`code_type`,`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
DROP TABLE "COMPTE";
DROP TABLE "CLIENT";
DROP TABLE "CREDIT";
DROP TABLE "LOG";
CREATE TABLE "CLIENT" (
"LOGIN" VARCHAR(30) not null primary key,
"NOM" VARCHAR(30),
"PRENOM" VARCHAR(30),
"PASSWORD" VARCHAR(20),
"TYPE" VARCHAR(10) CONSTRAINT check_type CHECK(TYPE IN ('CLIENT', 'SUPERVISEUR', 'EMPL... |
delete from HtmlLabelIndex where id=857
/
delete from HtmlLabelInfo where indexid=857
/
INSERT INTO HtmlLabelIndex values(857,'相关文档')
/
INSERT INTO HtmlLabelInfo VALUES(857,'相关文档',7)
/
INSERT INTO HtmlLabelInfo VALUES(857,'Relative Document',8)
/
delete from HtmlLabelIndex where id=20208
/
delete from HtmlLabelInfo... |
# Host: localhost (Version 5.5.5-10.1.9-MariaDB)
# Date: 2018-06-25 15:45:48
# Generator: MySQL-Front 6.0 (Build 2.20)
#
# Structure for table "tbl_admin"
#
DROP TABLE IF EXISTS `tbl_admin`;
CREATE TABLE `tbl_admin` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL DEFAULT '',
`password`... |
-- 栏目配置中增加一个字段,字段定义表中也需要增加一条记录
alter table `aups_t002` add `s_shu_chengshi` varchar(60) default NULL COMMENT '所属城市, 可能是地级市,也可能是直辖市。地级市以上包括直辖市, 如可能是孝感,武汉,北京等能作为首页的';
INSERT INTO `dpps_field_def` (`t_id`, `name_eng`, `name_cn`, `creator`, `createdate`, `createtime`, `edit_flag`, `is_null`, `key`, `extra`, `type`, `f_ty... |
alter table "public"."bookmarks" drop constraint "bookmarks_bookmarkId_fkey";
|
#namespace("problem")
#define problemOrderBy()
#if(orderBy=="999999")
#else
order by p.create_time
#end
#end
#define problemFrom()
select * from sys_problem p where 1=1
#if(p_name)
AND p_name LIKE concat('%',#para(p_name),'%')
#end
#@problemOrderBy()
#end
#sql("query... |
CREATE TABLE
people
(
id integer not null,
nickname text,
jid text,
primary key (id)
);
CREATE TABLE
participants
(
event_id INTEGER NOT NULL,
people_id INTEGER NOT NULL,
status TEXT NOT NULL,
PRIMARY KEY (event_id, people_id)
);
CREATE TABLE
event
(... |
CREATE TABLE my_user(
userid INT,
username VARCHAR(20),
userlevel INT unsigned
);
CREATE TABLE "T_USER"
( "ID" NUMBER(10,0) NOT NULL,
"NAME" VARCHAR2(100 BYTE),
"AGE" NUMBER(3,0),
PRIMARY KEY ("ID")
);
select STATUS,MACHINE,OSUSER,PROGRAM from v$session where USERNAME='OSCAR999';
select STATUS,STATE,... |
DECLARE
--custom
v_Id TBL_FOM_CODEDPAGE.COL_ID%TYPE;
v_IsDeleted TBL_FOM_CODEDPAGE.COL_ISDELETED%TYPE;
v_IsNavMenuItem TBL_FOM_CODEDPAGE.COL_ISNAVMENUITEM%TYPE;
v_Name TBL_FOM_CODEDPAGE.COL_NAME%TYPE;
v_Code TBL_FOM_CODEDPAGE.COL_NAME%TYPE;
v_Description TBL_FOM_CODEDPAG... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.