text stringlengths 6 9.38M |
|---|
ALTER table hpNewsTabInfo Add sqlWhere_1 varchar2(4000)
/
update hpNewsTabInfo set sqlWhere_1 = sqlWhere
/
ALTER table hpNewsTabInfo drop column sqlWhere
/
ALTER TABLE hpNewsTabInfo RENAME COLUMN sqlWhere_1 TO sqlWhere
/
|
INSERT INTO `LedBy` (`PID`,`SIN`) VALUES (1001, 1);
INSERT INTO `LedBy` (`PID`,`SIN`) VALUES (1002, 5);
INSERT INTO `LedBy` (`PID`,`SIN`) VALUES (1003, 11);
INSERT INTO `LedBy` (`PID`,`SIN`) VALUES (1004, 3);
INSERT INTO `LedBy` (`PID`,`SIN`) VALUES (1005, 9);
INSERT INTO `LedBy` (`PID`,`SIN`) VALUES (1006, 7);
INSERT ... |
select nexttaskid,
nextcaseid,
nextslaseconds,
nextrownumber,
lasttaskid,
lastcaseid,
lastslaseconds,
lastrownumber,
prevtaskid,
prevcaseid,
prevslaseconds,
prevrownumber,
firsttaskid,
... |
INSERT INTO UserRecords VALUES (1, 'Bob', 'UK');
INSERT INTO UserRecords VALUES (2, 'Mac', 'UK');
INSERT INTO UserRecords VALUES (3, 'John', 'US');
INSERT INTO UserRecords VALUES (4, 'Frodo', 'UA');
|
/*
Navicat MySQL Data Transfer
Source Server : dbgirl
Source Server Version : 50715
Source Host : localhost:3306
Source Database : dbgirl
Target Server Type : MYSQL
Target Server Version : 50715
File Encoding : 65001
Date: 2017-08-31 10:12:44
*/
SET FOREIGN_KEY_CHECKS=0;
-- -----... |
SELECT
*
FROM
Item
WHERE
i_id IN (SELECT
i_id
FROM
Kitchen)
AND Warehouse_w_num IN (SELECT
w_num
FROM
warehouse
WHERE
number_of_employees > 10 AND w_size > 70); |
-- Compute the score average of all records in the table second_table of the database hbtn_0c_0 in your MySQL server
-- The database name will be passed as an argument of the mysql command
SELECT AVG(score) AS 'average' FROM second_table;
|
INSERT INTO admin VALUES('Wang Poh Peng', 'wangpp1@gmail.com', 'pohpeng123');
INSERT INTO admin VALUES('Qian Jun Yip', 'qj.en.yip@gmail.com', 'junyip234');
INSERT INTO admin VALUES('Lee Cheryl', 'leecheryl993@gmail.com', 'chery345');
INSERT INTO admin VALUES('Jia Le Kwang', 'kwangjiale@gmail.com', 'jiale456');
INSERT I... |
SELECT DISTINCT TO_CHAR(cast(gt.insert_date AS TIMESTAMP) at TIME zone 'CST', 'MM-DD-YYYY HH24:MI:SS') AS ORDER_ENTRY_TIME
,glog_util.remove_domain(gt.GTM_TRANSACTION_TYPE_GID) AS order_type
,gt.GTM_TRANSACTION_XID AS transaction_number
,glog_util.remove_domain(PTY.INV_PARTY) AS customer_id
,(
SELECT la.address_l... |
CREATE DATABASE IF NOT EXISTS `Fazenda`;
USE `Fazenda`;
CREATE TABLE IF NOT EXISTS `Fazenda`.`Proprietario` (
`Codigo` INT NOT NULL AUTO_INCREMENT,
`Nome` VARCHAR(45) NULL,
`Endereco` VARCHAR(45) NULL,
`Fone` VARCHAR(45) NULL,
PRIMARY KEY (`Codigo`)
);
CREATE TABLE IF NOT EXISTS `Fazenda`.`Fazendas` (
`Co... |
drop table if exists FLW_RU_BATCH_PART cascade constraints;
drop table if exists FLW_RU_BATCH cascade constraints;
drop index if exists FLW_IDX_BATCH_PART; |
-- phpMyAdmin SQL Dump
-- version 4.8.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Waktu pembuatan: 18 Apr 2020 pada 00.21
-- Versi server: 10.1.36-MariaDB
-- Versi PHP: 7.2.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHAR... |
--
-- Permissions
--
INSERT INTO `auth_permission` (`class`, `code`, `label`, `description`, `admin`) VALUES
('events', 'can_admin', 'Amministrazione modulo', 'Amministrazione completa di categorie, eventi, opzioni e frontend', 1),
('events', 'can_publish', 'Pubblicazione eventi', 'Pubblicazione degli eventi', 1),
('e... |
# --- !Ups
create table "products" (
"id" bigint generated by default as identity(start with 1) not null primary key,
"name" varchar not null,
"price" int not null
);
create table "carts"(
"cartId" varchar not null,
"productName" varchar not null
);
insert into "products" values(2, 'Dove', 21.5);
insert in... |
DROP PROCEDURE CPI.DELETE_RECORDS;
CREATE OR REPLACE PROCEDURE CPI.DELETE_RECORDS (
p_par_id IN gipi_wpolbas.par_id%TYPE,
p_line_cd IN gipi_wpolbas.line_cd%TYPE,
p_subline_cd IN gipi_wpolbas.subline_cd%TYPE,
p_iss_cd IN gipi_wpolbas.iss_cd%TYPE,
p_issue_yy IN gipi_wpolbas.issue_yy%TYPE,
p_pol_seq_no IN gipi_wpol... |
SELECT
-- h.record_id,
-- item_record.id,
-- item_view.id,
-- h.patron_record_id,
vv.field_content as "callnum",
item_view.barcode,
concat (item_view.record_type_code, item_view.record_num, 'a') as "_oId"
,
item_view.location_code as "loc",
h.placed_gmt,
-- I don't know what this shows
... |
CREATE TABLE user (
nama CHAR(32) NOT NULL,
password CHAR(32) NOT NULL,
PRIMARY KEY(nama)
); |
-------------------------------------------------------
-- Export file for user AVS@172.16.210.179:1521/ORCL --
-- Created by Administrator on 2017/7/13, 9:48:40 -----
-------------------------------------------------------
set define off
spool table.log
prompt
prompt Creating table APPOINTMENT_MEETING
prom... |
with a as
(
select *
from
(
values
('2.1', 77.902, 103.869)
, ('2.2.1', 95.778, 127.704)
, ('2.2.2', 46.409, 61.879)
, ('2.3.1.1', 350.349, 365.000)
, ('2.3.1.2', 109.992, 146.656)
, ('2.3.2.1', 297.510, 365.000)
, ('2.3.2.2', 96.699, 128.932)... |
INSERT IGNORE INTO social_connections_badge (user_id, badge_content_id, ctime)
SELECT user_id, badge_id, ctime FROM user_badge WHERE deleted= 0 AND status = 'accepted';
|
alter table workflow_addinoperate add wftomodesetid varchar2(4000)
/
alter table mode_workflowtomodeset add isenable char(1)
/ |
### Create schema for burgers_db
DROP DATABASE IF EXISTS burgers_db;
CREATE DATABASE burgers_db;
USE burgers_db;
CREATE TABLE burgers(
burger_id INT NOT NULL AUTO_INCREMENT,
burger_name VARCHAR(200),
devoured BOOLEAN DEFAULT false,
PRIMARY KEY (burger_id)
); |
-- phpMyAdmin SQL Dump
-- version 4.8.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jan 17, 2019 at 06:35 AM
-- Server version: 10.1.34-MariaDB
-- PHP Version: 7.2.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
# Host: localhost (Version 5.6.17)
# Date: 2017-04-17 11:00:24
# Generator: MySQL-Front 6.0 (Build 1.117)
#
# Structure for table "produtos"
#
DROP TABLE IF EXISTS `produtos`;
CREATE TABLE `produtos` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`nome` varchar(255) DEFAULT NULL,
`categoria` varchar(255) DEFAULT N... |
alter table user drop column phone;
alter table user
add status int; |
CREATE DATABASE user WITH ENCODING = 'UTF-8';
CREATE TABLE user (
user_id VARCHAR (6) PRIMARY KEY,
id VARCHAR (16) NOT NULL ,
pass VARCHAR (16) dept(deptno)
name VARCHAR (40)
account_id VARCHAR (6)
) ; |
/**
* Author: Marco Machado
* Created: 28/09/2018
*/
create database if not exists academia;
use academia;
create table atleta(
atl_id int not null primary key auto_increment,
atl_nome varchar(50) null,
atl_idade int not null,
atl_peso decimal (5,2) not null,
atl_altura decimal (3,2) not null
)... |
-- phpMyAdmin SQL Dump
-- version 4.0.10deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jan 26, 2015 at 10:34 PM
-- Server version: 5.5.41-0ubuntu0.14.04.1
-- PHP Version: 5.5.9-1ubuntu4.5
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CL... |
USE `hefesto`;
DROP procedure IF EXISTS `sppaisInsert`;
DELIMITER $$
USE `hefesto`$$
CREATE PROCEDURE `sppaisInsert` (OUT paisId int(11), IN nombre varchar(45))
BEGIN
INSERT INTO pais ( pais.nombre)
VALUES ( nombre);
END$$
DELIMITER ;
USE `hefesto`;
DROP procedure IF EXISTS `sppaisUpdate`;
DELIMITER $$
USE `he... |
DROP TABLE IF EXISTS Matches;
DROP TABLE IF EXISTS Stats;
DROP TABLE IF EXISTS Players;
DROP TABLE IF EXISTS Position;
DROP TABLE IF EXISTS Teams;
CREATE TABLE Teams(
id INT PRIMARY KEY,
team_name varchar(15),
team_img text
);
CREATE TABLE Position(
id INT PRIMARY KEY,
position_type varchar(20)
);
... |
alter table ACT_HI_ENTITYLINK add column SUB_SCOPE_ID_ varchar(255);
alter table ACT_HI_ENTITYLINK add column PARENT_ELEMENT_ID_ varchar(255);
|
select* from PropertyTypes |
USE Smart_poll;
INSERT INTO Client
VALUES
('a@gmail.com', '123', 'Вячеслав', DEFAULT),
('b@gmail.com', '777', 'Никита', 37),
('c@ukr.net', '000', 'Артём', DEFAULT),
('d@gmail.com', '666', 'НеХочуГоворить', DEFAULT),
('e@mail.ru', '9999', 'ВашХозяин', 26),
('u@yandex.ru', '333', 'Inkognito', 19)
|
drop index PERTENECE_FK;
drop index TOMA_FK;
drop index ASIENTO_PK;
drop table ASIENTO;
drop index TIENE_FK;
drop index AUTOMOVIL_PK;
drop table AUTOMOVIL;
drop index TIENE3_FK;
drop index RELATIONSHIP_3_FK;
drop index CONDUCTOR_PK;
drop table CONDUCTOR;
drop index FACULTAD_PK;
drop table FACULTAD;
drop in... |
/* 4º Exercício */
select ds_cidade_nome, ds_uf_sigla, ds_uf_nome
from cidades, uf
where cidades.uf_cd_uf = uf.cd_uf
and ds_uf_sigla in("PR", "SC", "BA", "ES"); |
PRAGMA foreign_keys = ON;
CREATE TABLE users (
id INTEGER PRIMARY KEY,
fname TEXT NOT NULL,
lname TEXT NOT NULL
);
CREATE TABLE questions (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL,
body TEXT NOT NULL,
user_id INTEGER NOT NULL,
FOREIGN KEY (user_id) REFERENCES users(id)
);
CREATE TABLE quest... |
update ACT_GE_PROPERTY set VALUE_ = '6.3.0.0' where NAME_ = 'variable.schema.version';
|
grant select on STG_CLIENTE_ORIGEN to DW_LOAD; |
DELETE FROM UsersInRoles
WHERE
RoleID = @ID;
DELETE FROM RoleClaims
WHERE
RoleID = @ID;
DELETE FROM Roles
WHERE
ID = @ID; |
USE codeup_test_db;
#Before each item, output a caption explaining the results:
# using SELECT column1, column2, ... FROM table_name; format
SELECT 'The name of all albums by Pink Floyd...' AS 'Exercise 1';
SELECT name FROM albums
WHERE artist = 'Pink Floyd';
SELECT 'The year Sgt. Pepper''s Lonely Hearts Club Band w... |
use booklist;
insert into admin values
('heji','19881030');
insert into booklist values
(1,'ten_books_to_know_programming',10,'heji','computer science'),
(2,'ten_books_to_know_sex',10,'heji','social science'),
(3,'ten_books_about history',10,'heji','computer science');
insert into book values
('1234567890123','Steve... |
CREATE PROCEDURE Insertupdatedelete (@clg_id INT,
@clg_name VARCHAR(50),
@clg_address VARCHAR(50),
@clg_phone_number INT,
... |
alter table "public"."users" rename column "display_full_name" to "displayFullName"; |
-- Assigned each quest only one faction
-- Quest 7877 Horde - http://www.wowhead.com/quest=7877 (The Treasure of the Shen'dralar)
-- Quest 7462 Alliance - http://www.wowhead.com/quest=7462 (The Treasure of the Shen'dralar)
-- This closes #514
UPDATE `quest_template` SET `RequiredRaces` = 178 WHERE `entry` = 7877; -- h... |
SELECT year,
COUNT(globaleventid) AS nb_events
FROM gdelt.eventsorc
WHERE actor1name='BARACK OBAMA'
GROUP BY year
ORDER BY year ASC;
|
insert into user values(101, sysdate(), 'AB');
insert into user values(102, sysdate(), 'Jack');
insert into user values(103, sysdate(), 'Jill');
insert into user values(104, sysdate(), 'Hank');
insert into user values(105, sysdate(), 'Peggy');
insert into post values(101, 'This is a post', 101);
insert into post valu... |
-- phpMyAdmin SQL Dump
-- version 5.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 06, 2021 at 10:33 AM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD... |
CREATE TABLE IF NOT EXISTS Usr (
ID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
UsrName VARCHAR(60) NOT NULL,
UsrPass VARCHAR(60) NOT NULL,
UsrEmail VARCHAR(255) NOT NULL,
UNIQUE ( UsrName ),
UNIQUE ( UsrEmail ) /* Does this require to be Unique? It shoud not! However, if NOT, then the password reset logic nee... |
alter table SEC_USER change column GROUP_NAMES GROUP_NAMES__U79754 varchar(255)^
alter table SEC_USER change column PASSWORD_ENCRYPTION PASSWORD_ENCRYPTION__U71339 varchar(50)^
alter table SEC_USER change column SYS_TENANT_ID_NN SYS_TENANT_ID_NN__U91548 varchar(255)^
alter table SEC_USER change column SYS_TENANT_ID SYS... |
-- phpMyAdmin SQL Dump
-- version 2.10.3deb1ubuntu0.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Mar 14, 2008 at 02:46 PM
-- Server version: 5.0.45
-- PHP Version: 5.2.3-1ubuntu6.3
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT=0;
START TRANSACTION;
--
-- Database: ... |
create table nts_project_device
(
id bigint auto_increment
primary key,
project_id bigint null comment '项目ID',
device_id varchar(64) null comment '设备ID'
);
INSERT INTO coldchain_device.nts_project_device (id, project_id, device_id) VALUES (6, 7, '11a920fc2ab84fe38e77509cafcd2930');
IN... |
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
`role_id` INT,
`permission_id` INT,
FOREIGN KEY (`role_id`) REFERENCES `role` (`id`),
FOREIGN KEY (`permission_id`) REFERENCES `permission` (`id`)
) ENGINE=INNODB DEFAULT CHARSET=utf8 |
-- *********************************************************************
-- Update Database Script
-- *********************************************************************
-- Change Log: org/kuali/ole/1.6.2/db.changelog-20150731.xml
-- *********************************************************************
-- Lock... |
SELECT * FROM bancocurriculos.usuarios;
CREATE TABLE ... (
...
cpf CHAR 11 NOT NULL DEFAULT '00000000000',
...
CONSTRAINT uk_cpf UNIQUE KEY (cpf),
...
); |
SELECT
end_station,
AVG(duration) 'average duration'
FROM
trips
GROUP by end_station
ORDER by AVG(duration) |
DROP TABLE IF EXISTS Work;
DROP TABLE IF EXISTS Account;
DROP TABLE IF EXISTS Role;
DROP TABLE IF EXISTS Fact;
DROP TABLE IF EXISTS Animal;
DROP TABLE IF EXISTS Sector; |
SET SERVEROUTPUT ON
DECLARE
v_exist NUMBER := 0;
BEGIN
SELECT 1
INTO v_exist
FROM cpi.giis_parameters
WHERE param_name = 'PRD_POL_CNT';
IF v_exist = 1 THEN
DELETE FROM GIIS_PARAMETERS
WHERE param_name = 'PRD_POL_CNT';
ELSIF v_exist <> 1 THEN
DBMS_OUTPUT.put_line('No Param... |
-- READ
SELECT * FROM person;
-- This says "select all columns from person and return all rows."
-- The format for SELECT is SELECT what FROM tables(s) WHERE (tests) and the WHERE clause is optional.
-- The '*' (asterisk) character is what says you want all columns.
SELECT name, age FROM pet;
-- In this one I'm only... |
SELECT Title, Description, Category, ArtistName, Epoch FROM ArtObject
WHERE Ownership="perm";
-- Query all Art that identifies as being part of the Permanent Collection. |
-- phpMyAdmin SQL Dump
-- version 5.0.4
-- https://www.phpmyadmin.net/
--
-- Servidor: mariadb
-- Tiempo de generación: 25-12-2020 a las 14:59:19
-- Versión del servidor: 10.4.17-MariaDB-1:10.4.17+maria~focal
-- Versión de PHP: 7.4.11
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";... |
ALTER TABLE sht.invoice
ADD COLUMN contract_id CHARACTER VARYING;
ALTER TABLE sht.invoice
ADD COLUMN created_at TIMESTAMP WITHOUT TIME ZONE;
ALTER TABLE sht.invoice
ADD COLUMN party_revision BIGINT;
ALTER TABLE sht.payment
ADD COLUMN contract_id CHARACTER VARYING;
ALTER TABLE sht.payment
ADD COLUMN party_rev... |
drop table edinstitution cascade;
create table EdInstitution(
EdID serial not null primary key,
LocID int,
EOName varchar(300),
EOTypeName varchar(300),
EOParent varchar(300),
constraint FKLocID
foreign key (LocID)
references locationtable(LocID)
); |
drop database if exists gobody;
create database gobody;
use gobody;
create table article(
id int(10) not null primary key unique auto_increment,
articleid varchar(255) not null,
title varchar(255) not null,
subject varchar(255) not null,
url ... |
ALTER TABLE ADM_TDEPT ADD CONSTRAINT FK_ADM_DEPT_ADM_PAIS
FOREIGN KEY (DEPT_PAIS) REFERENCES ADM_PAIS (PAIS_PAIS)
;
|
-- Q1 returns (name,name,born_in)
SELECT DISTINCT father.name AS father_name,
mother.name AS mother_name,
father.born_in AS born_in
FROM person AS father,... |
/*
Navicat Premium Data Transfer
Source Server : ju
Source Server Type : MySQL
Source Server Version : 50722
Source Host : localhost:3306
Source Schema : seata_storage
Target Server Type : MySQL
Target Server Version : 50722
File Encoding : 65001
Date: 08/12/2020 19:... |
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
--
-- Database: `angula... |
DROP DATABASE IF EXISTS bamazon_db;
CREATE DATABASE bamazon_db;
USE bamazon_db;
CREATE TABLE products (
id INTEGER(10) NOT NULL AUTO_INCREMENT,
name VARCHAR(50),
department VARCHAR(30),
price INTEGER(10),
stock INTEGER(10),
PRIMARY KEY (id)
);
INSERT INTO products (name, department, price, stock)
VALUES ... |
--계좌정보 테이블
create table banking_tb(
acc_index number primary key,
acc_id varchar2(100),
cust_name varchar2(50) not null,
acc_money number not null
);
desc banking_tb;
drop table banking_tb;
--시퀀스 생성
create sequence seq_banking
increment by 1
start with 1
minvalue 1
nomaxvalue
nocyc... |
CREATE TABLE IF NOT EXISTS SESSIONS (
session_id INTEGER NOT NULL AUTO_INCREMENT,
session_name VARCHAR(128) NOT NULL,
session_description VARCHAR(128) NOT NULL,
session_length INT(11) NOT NULL,
PRIMARY KEY (session_id)
);
CREATE TABLE IF NOT EXISTS SPEAKERS (
speaker_id INTEGER ... |
-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 31, 2021 at 11:56 PM
-- Server version: 5.7.32
-- PHP Version: 7.4.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `gs_bookmark_db`
--
-- --------------------... |
CREATE TABLE `messages` (
`eventID` TEXT PRIMARY KEY,
`teamID` TEXT NOT NULL,
`channelID` TEXT NOT NULL,
`channelName` TEXT NOT NULL,
`userID` TEXT NOT NULL,
`userDisplay` TEXT NOT NULL,
`messageText` TEXT NOT NULL,
`messageTime` TIMESTAMP NOT NULL
);
CREAT... |
delete from HtmlLabelIndex where id=24315
/
delete from HtmlLabelInfo where indexid=24315
/
INSERT INTO HtmlLabelIndex values(24315,'本机构工作年限')
/
delete from HtmlLabelIndex where id=24314
/
delete from HtmlLabelInfo where indexid=24314
/
INSERT INTO HtmlLabelIndex values(24314,'岗位调动时间')
/
INSERT INTO HtmlLabelInfo... |
create database simpleAppDB;
use simpleAppDB;
create table Customer(
customerId bigint auto_increment,
fName varchar(50) not null,
lName varchar(50) not null,
PRIMARY KEY (customerId)
);
insert into Customer(fName,lName)values('Mike','Marcel');
insert into Customer(fName,lName)values('Scott','Satine');
... |
SELECT id
FROM movie
WHERE title = 'Casablanca' |
create table if not exists tbl_tasks (
id serial not null primary key,
title varchar(200) not null default null,
description text,
date_time_limit timestamp,
created_at timestamp default CURRENT_TIMESTAMP not null,
updated_at timestamp default CURRENT_TIMESTAMP not null,
deleted_at timestamp... |
-- students
-- -- id, name, emails, phone, github, start_date, end_date, cohort_id
-- cohorts
-- -- id, name, start_date, end_date
-- assignments
-- -- id, name, content, duration, day, chapter
-- assignment_submissions
-- -- id, assignment_id, student_id, submission_date, duration
-- teachers
-- -- id, name, start... |
-- SELECT field1, field2,...fieldN table_name1, table_name2...
-- ORDER BY field1, [field2...] [ASC [DESC]]
-- ASC升序
-- DESC降序 |
-- MySQL dump 10.13 Distrib 5.6.13, for Win32 (x86)
--
-- Host: 127.0.0.1 Database: library
-- ------------------------------------------------------
-- Server version 5.5.5-10.1.21-MariaDB
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RES... |
-- 1 November 2017
-- read in a .sql file
.read <file_name>
-- read in a csv file
.mode csv
.import <file_name> <table_name>
-- turn on columns
.mode col
-- turn on column headers
.headers on
-- turn on foreign keys
PRAGMA foreign_keys = ON;
-- turn off automatic indexes
PRAGMA automatic_index = 0;
-- print tabl... |
use alphin;
create table employee(
id int(10),
name varchar(10),
Last_name varchar(10),
department int(5)
);
insert into employee values
(123234877,'Michael','Rogers',14),
(152934485,'Anand','Manikutty',14),
(222364883,'Carol','Smith',37),
(326587417,'Joe','Stevens',37),
(332154719,'Mary-Anne','Foster',... |
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 04, 2019 at 11:27 PM
-- Server version: 10.3.15-MariaDB
-- PHP Version: 7.2.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @... |
DROP DATABASE IF EXISTS `Student_Database`;
CREATE DATABASE `Student_Database`;
USE `Student_Database`;
CREATE TABLE student(
sid int auto_increment,
firstname varchar(40) NOT NULL,
lastname varchar(40) NOT NULL,
DOB DATE NOT NULL,
PRIMARY KEY(sid)
);
CREATE TABLE enrolledIn(
sid int NOT NULL,
cid int NOT NULL,
FORE... |
CREATE DATABASE ROOT;
USE ROOT;
/**Tabelas de infraestrutura**/
CREATE TABLE TB_PERFIL(
ID_PERFIL smallint unsigned not null auto_increment,
NM_PERFIL VARCHAR(30) NOT NULL,
IN_ATIVO varchar(1) not null default 'S',
CONSTRAINT PK_PERFIL primary key (ID_PERFIL));
CREATE INDEX IN_TB_PERFIL_01 ON TB_PERFIL(ID_PERFIL);... |
SELECT ROUND(
IFNULL(
SELECT COUNT(*) from (select DISTINCT requester_id, accpeter_id from RequestAccepted)
/SELECT COUNT(*) from (select DISTINCT sender_id, sender_to_id from FriendRequest)
,0)
,2) as accepte_rate
|
-- Stored Procedure for registering BUYER
set serveroutput on;
CREATE OR REPLACE PROCEDURE REGISTERBUYER (
u_userid user1.userid%TYPE,
u_userType user1.user_type%TYPE,
u_dateCreated user1.datecreated%TYPE,
b_id BUYER.BUYERID%TYPE,
b_membership buyer.membership%TYPE,
b_buyerFirstName buyer.buyerfirstname%TYPE,
b_buy... |
CREATE DATABASE IF NOT EXISTS `udg_music_logger` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `udg_music_logger`;
/*!40101 SET @OLD_CHARACTER_SET_CLIENT = @@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS = @@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION = @@COLLATION_CONNECTION */... |
--
-- oauth2-server-php-DDL
--
-- DDL to create MySQL database, user, and tables for PDO storage
-- support of https://github.com/bshaffer/oauth2-server-php.
--
CREATE USER 'oauth'@'localhost' IDENTIFIED BY 'oauth';
DROP DATABASE IF EXISTS oauth;
CREATE DATABASE oauth;
GRANT ALL PRIVILEGES ON oauth.* TO oaut... |
alter table O_EMP drop(roleid);
alter table O_FINANCIAL add schoolname varchar2(50); |
update tbl_accounts
set token_expire = %2
where account_id = %1
|
ALTER TABLE "public"."fileobjects" ALTER COLUMN "size" TYPE int8;
|
use rf_league_db;
alter table player
modify column selfRating int;
|
CREATE DATABASE IF NOT EXISTS `trocafigurinha` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `trocafigurinha`;
-- MySQL dump 10.13 Distrib 5.6.24, for Win64 (x86_64)
--
-- Host: 127.0.0.1 Database: trocafigurinha
-- ------------------------------------------------------
-- Server version 5.7.8-rc-log
/*!40101 SET @... |
/*
SQLyog Ultimate v11.27 (32 bit)
MySQL - 5.5.46-log : Database - market
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHE... |
CREATE TABLE IF NOT EXISTS SHOP
(
shopID VARCHAR(128) NOT NULL PRIMARY KEY,
owner VARCHAR(128) NOT NULL,
name VARCHAR(128) NOT NULL,
dispName VARCHAR(128) NOT NULL,
address VARCHAR(128),
latitude DECIMAL(10,6),
longitude DECIMAL(10,6),
category VARCHAR(128),
admin... |
CREATE TABLE ALA (id numeric(10,2), name character varying(266)); |
/*
*inspired by shanki
*/
drop table if exists "Categories" cascade;
create table "Categories" (
id serial primary key,
category_name varchar,
measurement_unit varchar
);
drop table if exists "Menu" cascade;
create table "Menu" (
id serial primary key,
dish_name varchar,
price numeric,
reci... |
alter table activity add column end_time timestamp null;
alter table activity alter column start_time type timestamp;
alter table activity alter column created_at type timestamp;
alter table report alter column created_at type timestamp with time zone;
alter table report alter column updated_at type timestamp with t... |
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 30, 2021 at 01:17 PM
-- Server version: 10.4.19-MariaDB
-- PHP Version: 8.0.7
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIEN... |
Select SUM(population) as avg_population from CITY where district = 'California' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.