sql
stringlengths
6
1.05M
<reponame>MichellRPS/curso_php7_profissional SELECT AVG(precounitario) AS media FROM produtos
<reponame>LazarPanchev/PHPWebDevelopment -- USE PHPEXERCISE DATABASE -- create table users CREATE TABLE `users` ( user_id INT NOT NULL AUTO_INCREMENT, name VARCHAR(50) NOT NULL, `password` VARCHAR(50) NOT NULL, email VARCHAR(50) NULL, Primary key (user_id) ); -- create table roles CREATE TABLE `roles` ( role_id INT N...
--[beginscript] create table CK.tActorEMail ( ActorId int not null, EMail nvarchar( 255 ) collate Latin1_General_100_CI_AS not null, IsPrimary bit not null, ValTime datetime2(2) not null, constraint PK_CK_ActorEMail primary key (ActorId,EMail), constraint FK_CK_ActorEMail_ActorId foreign key (ActorId) references...
<reponame>yonofate/vaobong -- -- Database version 9 Update script -- -- 2012-06-29 -- -- This update adds the keywords and descripton on the post entity for -- meta tag generation. ALTER TABLE [post] ADD [post_keywords] NVARCHAR(128) NULL; ALTER TABLE [post] ADD [post_description] NVARCHAR(255) NULL;
<reponame>mirazib71/BloodBook<filename>Another_Server_Codes/SearchRecipient.sql clear screen; set serveroutput on; set verify off; declare rin recipient.rid%TYPE := '&RID'; RID recipient.rid%TYPE; Rname recipient.rname%type; Rage recipient.rage%type; Rgender recipient.rgender%type; Rbloodgroup recipient.rblo...
<reponame>keenplify/mlbb-finder<filename>database/mlbb_finder_nov_26.sql -- phpMyAdmin SQL Dump -- version 5.1.1 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Nov 26, 2021 at 02:04 PM -- Server version: 10.4.21-MariaDB -- PHP Version: 8.0.11 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRAN...
<filename>src/Minsal/Sipernes/ReportesBundle/Resources/views/rpt_consultas/consulta_rpt_17.sql SELECT row_number() over (order by ctl_departamento.nombre) n, ctl_departamento.nombre departamento, ctl_municipio.nombre municipio, ctl_establecimiento.nombre establecimiento, sum(enf_mov_inventario.cantidad_m...
CREATE PROCEDURE [security].[Membership_UpdatePasswordSuccess] ( @Username varchar(max) = '' ) AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; -- Get the GUID for the user DECLARE @UserGuid uniqueidentifier; SELEC...
<gh_stars>1-10 # 插入角色 INSERT INTO `sys_role` VALUES ('1', '1', '2019-02-27 15:47:15', 0, NULL, NULL, 'admin', '管理员', 0); # 插入用户 INSERT INTO `sys_user` VALUES ('1', '1', '2019-02-27 15:18:01', 0, NULL, NULL, 1, '管理员', '$2a$10$VwKECHVLs5NSFdq0rb/mp./P6yLjUEVR16MKRDS5YYB.GVaCUfksK', 0, 'admin'); # 插入用户据角色关联信息 INSE...
<reponame>navikt/fp-abakus<filename>migreringer/src/main/resources/db/migration/defaultDS/1.0/V1.1_53__fjerner-kodeverks-relasjon.sql DROP TABLE kodeliste_relasjon;
<filename>dbms/t_query/MTObjectAttribute.sql --liquibase formatted sql --changeset dudin_m:MTObjectAttribute.sql dbms:postgresql runOnChange:true splitStatements:false stripComments:false INSERT INTO s_mt.t_query (ck_id, cc_query, ck_provider, ck_user, ct_change, cr_type, cr_access, cn_action, cv_description) VALUES ('...
<reponame>TASEWA/Expense-Tracker<filename>database/Expense.sql<gh_stars>1-10 CREATE TABLE expense( id int , expense_id serial primary key, item varchar(20), amount numeric(11, 2), expense_date DATE, foreign key (id) references userProfile(id) ); CREATE TABLE income( ...
<reponame>hyee/dbcli /*[[ Get DDL statement. Usage: @@NAME {[owner.]<object_name> [<object_type>]} --[[ @CHECK_ACCESS_OBJ: dba_views={dba_views}, default={all_views} @CHECK_ACCESS_COLS: dba_tab_cols={dba_tab_cols} default={all_tab_cols} @CHECK_ACCESS_EXP : sys.dbms_sql2={1} default={0} ...
-- data storage schema CREATE TYPE fetch_data_type AS ENUM ('price', 'rate', 'auth_data','gold', 'btc', 'usd'); CREATE TABLE "fetch_data" ( id SERIAL PRIMARY KEY, created TIMESTAMPTZ NOT NULL, data JSON NOT NULL, type fetch_data_type NOT NULL ); CREATE INDEX "fetch_data_created_index" ON "fetch_data" (creat...
-- vtabB.test -- -- execsql { -- CREATE TABLE t1(x); -- BEGIN; -- CREATE VIRTUAL TABLE temp.echo_test1 USING echo(t1); -- DROP TABLE echo_test1; -- ROLLBACK; -- } CREATE TABLE t1(x); BEGIN; CREATE VIRTUAL TABLE temp.echo_test1 USING echo(t1); DROP TABLE echo_test1; ROLLBACK;
CREATE FUNCTION public.set_current_timestamp_updated_at() RETURNS trigger LANGUAGE plpgsql AS $$ DECLARE _new record; BEGIN _new := NEW; _new."updated_at" = NOW(); RETURN _new; END; $$; CREATE TABLE public.favorites ( id uuid DEFAULT public.gen_random_uuid() NOT NULL, user_id uuid NOT NULL, ...
-- phpMyAdmin SQL Dump -- version 4.8.0 -- https://www.phpmyadmin.net/ -- -- Máy chủ: 127.0.0.1 -- Thời gian đã tạo: Th3 16, 2019 lúc 07:40 AM -- Phiên bản máy phục vụ: 10.1.31-MariaDB -- Phiên bản PHP: 7.2.4 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!...
--Testcase 111: CREATE EXTENSION IF NOT EXISTS :DB_EXTENSIONNAME; --Testcase 112: CREATE SERVER :DB_SERVERNAME FOREIGN DATA WRAPPER :DB_EXTENSIONNAME OPTIONS( drivername :DB_DRIVERNAME, url :DB_URL, querytimeout '15', jarfile :DB_DRIVERPATH, maxheapsize '600' ); --Testcase 113: CREATE USER MAPPING FOR public SERVER :DB...
<filename>backend/de.metas.adempiere.adempiere/migration/src/main/sql/postgresql/system/10-de.metas.adempiere/5520770_sys_gh5101_msgs.sql<gh_stars>1000+ -- 2019-05-03T16:31:47.672 -- I forgot to set the DICTIONARY_ID_COMMENTS System Configurator INSERT INTO AD_Message (AD_Client_ID,AD_Message_ID,AD_Org_ID,Created,Creat...
/* triton #1632 cycleless mode */ ALTER TABLE `program` DROP COLUMN `use_cycles`;
-- SPDX-License-Identifier: Apache-2.0 -- Licensed to the Ed-Fi Alliance under one or more agreements. -- The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0. -- See the LICENSE and NOTICES files in the project root for more information. PRINT N'Creating primary key [LearningObjectiveCon...
/* Navicat MySQL Data Transfer Source Server : Project Source Server Version : 50540 Source Host : localhost:3306 Source Database : elecrecord Target Server Type : MYSQL Target Server Version : 50540 File Encoding : 65001 Date: 2016-06-08 14:00:38 */ SET FOREIGN_KEY...
DROP FUNCTION IF EXISTS dashboard_get_subunit_parent_id; DELIMITER $$ CREATE FUNCTION dashboard_get_subunit_parent_id ( id INT ) RETURNS INT DETERMINISTIC READS SQL DATA BEGIN SELECT (SELECT t2.id FROM ohrm_subunit t2 WHERE t2.lft < t1.lft AND t2.rgt > t1.rgt ...
INSERT INTO COUNTRY (ID, NAME) VALUES (1, 'Brazil'); INSERT INTO COUNTRY (ID, NAME) VALUES (2, 'United Kingdom'); INSERT INTO CONTACT_TYPE (ID, NAME) VALUES (1, 'Mobile'); INSERT INTO CONTACT_TYPE (ID, NAME) VALUES (2, 'Phone'); INSERT INTO CONTACT_TYPE (ID, NAME) VALUES (3, 'E-mail'); INSERT INTO PROFESSION (ID, NAM...
DROP table IF EXISTS employee; DROP TABLE IF EXISTS TEMPORAL; DROP TABLE IF EXISTS CATALOG; drop table IF EXISTS BOOK_I18N; drop table IF EXISTS BOOK; drop table IF EXISTS AUTHOR; DROP TABLE IF EXISTS TC; DROP TABLE IF EXISTS TB; DROP TABLE IF EXISTS TA; drop table IF EXISTS GALLERY_PAINTING; drop table IF EXISTS GALLE...
<filename>persistence/sql/migrations/sql/20201201161451_credential_types_values.down.sql<gh_stars>1-10 DELETE FROM identity_credential_types WHERE name = 'password' OR name = 'oidc';
CREATE TABLE `quameter_spectra` ( `quameter_spectra_id` INT NOT NULL AUTO_INCREMENT, `quameter_result_id` INT NULL, `quameter_pg_id` INT NULL, `unique_spectra` INT NULL, PRIMARY KEY (`quameter_spectra_id`), INDEX `quameter_spectra_ibfk_1` (`quameter_result_id` ASC), INDEX `quameter_spectra_ibfk_2` (`quame...
ALTER TABLE workspaces ADD COLUMN ahead_count INT, ADD COLUMN behind_count INT;
DROP TABLE IF EXISTS COFFEE_DESCRIPTION; DROP TABLE IF EXISTS COFFEE_HOUSE; DROP TABLE IF EXISTS MERCH_INVENTORY; DROP TABLE IF EXISTS COFFEE_INVENTORY; DROP TABLE IF EXISTS RSS_FEED; DROP TABLE IF EXISTS COFFEE; DROP TABLE IF EXISTS SUPPLIER; DROP TABLE IF EXISTS DATA_REPOSITORY;
<filename>extractor/sql/metadata/spectrum/sap_hana.sql SELECT * FROM ( SELECT fields, casting, field_type, json, column_name, column_key, encoding FROM ( SELECT -1 AS POSITION, CASE WHEN '${PARTITION_TYPE}' = 'date' OR '${PARTITION...
CREATE TABLE parent(id INT NOT NULL, PRIMARY KEY(id), name VARCHAR(256) NOT NULL, UNIQUE(name), state CHAR(2)); CREATE TABLE child(id INT NOT NULL, PRIMARY KEY(id), pid INT, GROUPING FOREIGN KEY(pid) REFERENCES parent(id), name VARCHAR(256) NOT NULL); CREATE TABLE customers ( cid int NOT NULL, PRIMARY KEY(cid), ...
<gh_stars>0 SELECT CEIL(AVG(Salary)-AVG(REPLACE(Salary,'0',''))) FROM EMPLOYEES;
select birth as BirthYear from people where name = "<NAME>";
-- phpMyAdmin SQL Dump -- version 4.7.4 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1:3306 -- Generation Time: Jun 13, 2018 at 06:05 AM -- Server version: 5.7.19 -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OLD_CH...
insert into Turma (Turma, UsuInc, UsuAlt, DatInc, DatAlt) values ('HBSIS', 1, 1, GETDATE(), GETDATE()) go select * from Turma
<reponame>shyed2001/MySQL_RDBMS<gh_stars>0 -- @block CREATE TABLE Users( id INT PRIMARY KEY AUTO_INCREMENT, age INT, email VARCHAR(255) NOT NULL UNIQUE, bio TEXT, country VARCHAR(2) ); -- @block <<<<<<< Updated upstream INSERT INTO Users (age, email, bio, country) ======= <<<<<<< HEAD INSERT INTO Users (em...
-- phpMyAdmin SQL Dump -- version 4.7.9 -- https://www.phpmyadmin.net/ -- -- Servidor: 127.0.0.1 -- Tiempo de generación: 09-07-2018 a las 19:45:59 -- Versión del servidor: 10.1.31-MariaDB -- Versión de PHP: 7.2.3 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; ...
INSERT INTO pos_itemtemp VALUES("IATT190001956","193022","191001","192003","30000","1","30000","0","30000","1","1","1","IAT1308191023","NHO2018000007","PAID","","193022"), ("IATT190001957","193011","191001","192001","40000","1","40000","0","40000","1","1","1","IAT1308191023","NHO2018000007","PAID","lvl 1","PEDAS"), ("I...
DROP TABLE IF EXISTS class; DROP TABLE IF EXISTS TA; DROP TABLE IF EXISTS backupClass; DROP TABLE IF EXISTS instructors; DROP TABLE IF EXISTS user; DROP TABLE IF EXISTS excelHeader; CREATE TABLE instructors ( name VARCHAR(40) NOT NULL, dept VARCHAR(20), unit INTEGER, PRIMARY KEY(name) ); CREATE TABLE backupClass ( ...
<gh_stars>1-10 CREATE TABLE [dbo].[Framework] ( [Id] VARCHAR(15) NOT NULL PRIMARY KEY, [Title] VARCHAR(1000) NOT NULL, [FrameworkName] VARCHAR(500) NOT NULL, [PathwayName] VARCHAR(500) NOT NULL, [ProgType] INT NOT NULL, [FrameworkCode] INT NOT NULL, [PathwayCode] INT NOT NULL, [Level] INT NOT NULL, [TypicalLe...
INSERT INTO `items` (name, label) VALUES ('gps', 'GPS') ;
# Use the database use bookbookdb; #Insert Test Users INSERT into users (first_name, last_name, email, secret) VALUES ("John", "Travolta", "<EMAIL>","$2b$10$chimlCdP.3Wqdkf2BdgdAut18k2HxP7v.FnzcZ4lXMnNXK2bAC6Xm"); INSERT into users (first_name, last_name, email, secret) VALUES ("Woody", "Allen", "<EMAIL>","$2b$10$chim...
BEGIN TRANSACTION; CREATE TABLE IF NOT EXISTS [UserClaims] ( [Id] INTEGER NOT NULL CONSTRAINT [PK_UserClaims] PRIMARY KEY AUTOINCREMENT, [ClaimType] VARCHAR(255) NOT NULL, [ClaimValue] VARCHAR(255), [UserId] VARCHAR(36) NOT NULL, CONSTRAINT FK_UserUserClaim FOREIGN KEY (UserId) REFERENCES Users(Id...
<filename>S5/CS333-ASD/PGM_008a - SQL Trigger.sql /* Aim === To familiarize with SQL Triggers. Problem 1: ---------- Write a trigger which executes when we insert the values into the customer table and display the particulars of each item with it's total cost in separate tables. Assume `customer` relation has attrib...
-- migrate:up CREATE TABLE subscribers ( id INTEGER PRIMARY KEY, telegram_id INTEGER NOT NULL, notificationday INTEGER NOT NULL, notificationtime INTEGER NOT NULL ); -- migrate:down DROP TABLE subscribers
CREATE TABLE [dbo].[Contact] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [Name] NVARCHAR (150) NULL, [Address] NVARCHAR (250) NULL, [City] NVARCHAR (50) NULL, [Country] NVARCHAR (50) NULL, CONSTRAINT [PK_Contact] PRIMARY KEY CLUSTERED ([Id] ASC) );
ALTER TABLE `characters` ADD COLUMN `class` VARCHAR(10) NOT NULL AFTER `userId`, ADD COLUMN `gender` TINYINT(1) UNSIGNED NOT NULL AFTER `class`;
CREATE TABLE [ZGWSecurity].[Roles] ( [Role_SeqID] INT IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL, [Name] VARCHAR (50) NOT NULL, [Description] VARCHAR (128) NOT NULL, [Is_System] INT NOT NULL, [Is_System_Only] INT CONSTRAINT [DF_ZGWSecurity_Role...
<filename>AnnZone-Serve/db_export/mysql/ann_zone_serve_2018-01-30.sql # ************************************************************ # Sequel Pro SQL dump # Version 4541 # # http://www.sequelpro.com/ # https://github.com/sequelpro/sequelpro # # Host: localhost (MySQL 5.6.35) # Database: ann_zone_serve # Generation Time...
<gh_stars>100-1000 set @result := ''; set @@auto_increment_increment :=1; CALL foreach('0:2,3:4', ' input $x, $y; INSERT INTO test_cs.test_foreach VALUES (NULL, CONCAT($x, '','', $y)); '); SELECT * FROM test_cs.test_foreach;
CREATE PROC dbo.AgentJobs_Get( @InstanceIDs VARCHAR(MAX) = NULL, @enabled TINYINT=NULL, @IncludeCritical BIT=1, @IncludeWarning BIT=1, @IncludeNA BIT=0, @IncludeOK BIT=0, @JobName SYSNAME=NULL, @JobID UNIQUEIDENTIFIER=NULL ) AS DECLARE @Instances IDs IF @InstanceIDs IS NOT NULL BEGIN INSERT INTO @Instances...
SELECT MIN(stock) FROM e_store.products; SELECT MIN(stock) AS min_stock FROM e_store.products; SELECT MIN(stock) AS min_stock FROM e_store.products WHERE id > 3;
<filename>src/main/resources/sqls/deleteZimmerBelegung.sql DELETE FROM ZimmerBelegung WHERE ZimmerBelegungId = ?;
create table esliwo.stock_product_prices ( id bigint unsigned auto_increment primary key, stock_product_id bigint unsigned not null, price bigint unsigned default 0 not null, currency varchar(255) default 'UAH' not null, created_at ...
<gh_stars>0 IF not Exists(select * from LookupMaster where Name = 'EncounterType') insert into LookupMaster (Name,DisplayName,DeleteFlag)values('EncounterType','EncounterType','0') GO IF not exists(select * from LookupItem where Name = 'Adherence-Barriers') BEGIN insert into LookupItem(Name,DisplayName,DeleteFlag)...
<reponame>cyp1783245131/fly-admin /* Navicat MySQL Data Transfer Source Server : localhost Source Server Version : 50721 Source Host : localhost:3306 Source Database : fly_init Target Server Type : MYSQL Target Server Version : 50721 File Encoding : 65001 Date: 2019-05-06 15:56:13 ...
SELECT id = CAST(sysschedules.schedule_id AS NVARCHAR(50)), name = sysschedules.name, kind = 'SCHEDULE', isNotUsed = CAST(IIF(SUM(IIF(sysjobschedules.job_id IS NULL, 0, 1)) > 0, 0, 1) AS BIT), isEnabled = CAST(sysschedules.enabled AS BIT) FROM msdb.dbo.sysschedules LEFT JOIN...
<gh_stars>0 -- begin PETCLINIC_PET create table PETCLINIC_PET ( ID varchar(36) not null, VERSION integer not null, CREATE_TS timestamp, CREATED_BY varchar(50), UPDATE_TS timestamp, UPDATED_BY varchar(50), DELETE_TS timestamp, DELETED_BY varchar(50), NAME varchar(255), DTYPE varch...
<gh_stars>0 INSERT INTO quality (id, description) VALUES (4, 'PLATINUM'); INSERT INTO quality (id, description) VALUES (3, 'GOLD'); INSERT INTO quality (id, description) VALUES (2, 'SILVER'); INSERT INTO quality (id, description) VALUES (1, 'BRONZE'); INSERT INTO customer (id, name, email, country, gender, age, quality...
create table recipes_secret ( Id int not null primary key, ResultNameId int unsigned not null, ResultTypeId int unsigned not null, ResultLevel int unsigned not null, IngredientIdsCSV mediumtext not null, QuantitiesBin mediumtext not null, Jo...
-- Count all the languages present in the sample data set. SELECT t.tweet.lang, COUNT(1) FROM twitter t GROUP BY T.tweet.lang ORDER BY 2 DESC; -- Show the first 10 tweets that do not have any language encoding present. SELECT t.tweet FROM twitter t WHERE t.tweet.lang IS NULL FETCH FIRST 10 ROWS ONLY; -- C...
<filename>gpff-sql/procedures/aa2clipo/procCountAa2clipo.sql --DROP PROCEDURE GPSQLWEB.procCountAa2clipo CREATE PROCEDURE GPSQLWEB.procCountAa2clipo ( IN P_CLPCLA BIGINT, IN P_CLPNOM varchar(20), IN P_CLPAPE varchar(15), IN P_CLPAP2 varchar(15), IN P_CLPDI1 varchar(30), IN P_CLPDI2 varchar(30), IN P_CL...
create table at_global_setting( setting_id int auto_increment primary key, setting_name varchar(255), default_value varchar(255), setting_value varchar(255), mark text ); INSERT INTO `at_global_setting` (`setting_id`, `setting_name`, `default_value`, `setting_value`, `mark`) VALUES (1, 'home', '', NULL, '首页地址url');...
<gh_stars>1-10 library LARDPrepopulationPalmetto version '1.0.0' using FHIR version '4.0.0' include FHIRHelpers version '4.0.0' called FHIRHelpers //include otherLibrary version 'x.x' called otherLibrary //codesystem codeSystemName : 'OID' version 'x.x' //valueset valuesetName : 'OID' version 'x.x' codesystems{codeS...
INSERT INTO document_portlet (id_portlet, code_document_type) VALUES (158, 'pb_project'); INSERT INTO document_space (id_space, id_parent, document_space_name, description, document_space_view, id_space_icon, space_order, document_creation_allowed, workgroup_key) VALUES (100, 0, 'PB Projects', 'PB Projects', 'detail...
<filename>resources/migrations/20160509-create-5.0-csv-tables.up.sql CREATE TABLE v5_0_sources (id TEXT NOT NULL, results_id BIGINT REFERENCES results (id) NOT NULL, PRIMARY KEY (results_id, id), name TEXT, vip_i...
BEGIN WORK; -- Fix base_type column in candidate_session_outcomes ALTER TABLE candidate_session_outcomes ALTER base_type DROP NOT NULL; COMMIT WORK;
<filename>web/dbWebSource/procedures_functions/part_types_sel.sql CREATE PROCEDURE [dbo].[part_types_sel] ( @user_id INT = NULL ,@search_val nvarchar(100)=null ) AS BEGIN DECLARE @stmt VARCHAR(4000); SET @stmt = 'SELECT * FROM dbo.part_types WHERE 1=1 '; IF ISNULL(@search_val,'')<>'' set @stmt = @st...
DROP TABLE IF EXISTS parties; DROP TABLE IF EXISTS candidates; DROP TABLE IF EXISTS voters; DROP TABLE IF EXISTS votes; CREATE TABLE parties ( id INTEGER PRIMARY KEY, name VARCHAR(50) NOT NULL, description TEXT ); CREATE TABLE candidates ( id INTEGER PRIMARY KEY, first_name VARCHAR(30) NOT NULL, ...
truncate table NYE_OG_FERDIGSTILTE;
SELECT COUNT(*) FROM site AS s, so_user AS u1, tag AS t1, tag_question AS tq1, question AS q1, badge AS b1, account AS acc WHERE s.site_id = u1.site_id AND s.site_id = b1.site_id AND s.site_id = t1.site_id AND s.site_id = tq1.site_id AND s.site_id = q1.site_id AND t1.id = tq1.tag...
<filename>database file for project/coronatest.sql -- phpMyAdmin SQL Dump -- version 4.8.5 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Aug 26, 2020 at 06:47 PM -- Server version: 10.1.38-MariaDB -- PHP Version: 7.3.2 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSAC...
<gh_stars>0 /* Navicat MySQL Data Transfer Source Server : localhost_3306 Source Server Version : 50617 Source Host : localhost:3306 Source Database : darkgod Target Server Type : MYSQL Target Server Version : 50617 File Encoding : 65001 Date: 2021-12-06 23:28:08 */ SET FOREIGN_KE...
<filename>jeff-farm-ws/src/main/sql/functions/update/update_livestock.sql DROP FUNCTION IF EXISTS update_livestock; CREATE FUNCTION update_livestock ( IN user_id INT , IN id INT , IN name VARCHAR(255) ) RETURNS VOID AS $body$ BEGIN IF permission_check_livestock(set_user_id(update_livestock.user_id), update_lives...
<reponame>rajeshchauhan23102008/DatingApp<gh_stars>0 CREATE TABLE IF NOT EXISTS "__EFMigrationsHistory" ( "MigrationId" character varying(150) NOT NULL, "ProductVersion" character varying(32) NOT NULL, CONSTRAINT "PK___EFMigrationsHistory" PRIMARY KEY ("MigrationId") ); CREATE TABLE "Values" ( "Id" se...
--- Developed by: @LucasMarcuzo select name, round((salary * 0.10),2) as tax from people where salary >= 3000;
-- -- Table structure for table `vrli_alerts` -- CREATE TABLE `vrli_alerts` ( `id` int(13) NOT NULL, `hostname` varchar(255) NOT NULL, `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `vmw_nsxt_firewall_src` varchar(255) DEFAULT NULL, `reverse_src` varchar(255) N...
DELIMITER $$; CREATE PROCEDURE usp_get_employees_salary_above(salary_threshold DECIMAL(10, 4)) BEGIN SELECT first_name, last_name FROM employees WHERE salary >= salary_threshold ORDER BY first_name, last_name, employee_id; END $$;
<reponame>mckennalusk7/bbbs_bridge-it<filename>database/data.sql<gh_stars>1-10 -- BIGS INSERT INTO "profile" ("profile_type", "first_name", "last_name", "sex", "dob_or_age", "race", "address", "latitude", "longitude", "ems", "summary", "preference", "interest", "b_employer", "b_occupation", "b_marital_status") VALUES...
<gh_stars>1-10 use NORTHWND go --Write a query to list the number of jobs available in the employees table select * from Employees --Display product which never been sold in 1998 --fillim gjejm ato qe jan shit select ProductID,ProductName from Products where ProductID not in ( select p.ProductID from Prod...
alter table parent_platform add startOfflinePush int default 0 null; alter table parent_platform add administrativeDivision varchar(50) not null; alter table parent_platform add catalogGroup int default 1 null; alter table device add ssrcCheck int default 0 null;
CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; CREATE TABLE chat( msg_id uuid DEFAULT uuid_generate_v4 (), msg VARCHAR NOT NULL, username VARCHAR NOT NULL, time TIMESTAMPTZ NOT NULL, room VARCHAR NOT NULL, CONSTRAINT chat_pkey PRIMARY KEY (msg_id) ); CREATE FUNCTION chat_delete_old_rows() RETURNS trigg...
-- file:select_parallel.sql ln:38 expect:true explain (costs off) select sum(parallel_restricted(unique1)) from tenk1 group by(parallel_restricted(unique1))
<reponame>Shuttl-Tech/antlr_psql -- file:triggers.sql ln:1631 expect:true create trigger child2_insert_trig after insert on child2 referencing new table as new_table for each statement execute procedure dump_insert()
-- Orleans Reminders table - https://dotnet.github.io/orleans/Documentation/Core-Features/Timers-and-Reminders.html CREATE TABLE OrleansRemindersTable ( ServiceId NVARCHAR(150) NOT NULL, GrainId VARCHAR(150) NOT NULL, ReminderName NVARCHAR(150) NOT NULL, StartTime DATETIME NOT NULL, Period BIGINT NO...
<reponame>sy3kic/nZEDb UPDATE `tmux` SET `value` = '0' where setting = 'IMPORT' and value = 'FALSE'; UPDATE `tmux` SET `value` = '1' where setting = 'IMPORT' and value = 'TRUE'; UPDATE `site` set `value` = '88' where `setting` = 'sqlpatch';
<reponame>blood0cean/liferay-7-2 create index IX_BE9462E4 on OFFICE_Office (active_); create index IX_59FA6885 on OFFICE_Office (groupId); create index IX_9BD661C4 on OFFICE_Office (name[$COLUMN_LENGTH:75$]); create index IX_1CBAB479 on OFFICE_Office (uuid_[$COLUMN_LENGTH:75$], companyId); create unique index IX_C02805...
<reponame>hbraha/ovirt-engine<filename>packaging/dbscripts/upgrade/04_02_0030_remove_PackageNamesForCheckUpdate_general_config_value.sql SELECT fn_db_delete_config_value('PackageNamesForCheckUpdate','general');
<reponame>lyp0924/YIIBLOG INSERT INTO `sea_arcrank` VALUES (1, 0, '开放浏览', 5, 0, 0, ''), (2, 10, '注册会员', 5, 0, 100, ''), (3, 50, '中级会员', 5, 300, 200, ''), (4, 100, '高级会员', 5, 800, 500, ''); INSERT INTO `sea_mytag` VALUES('1','areasearch','地区搜索','1251590919','<a href=\'/{seacms:sitepath}search.php?searchtype=2&searchwo...
<reponame>davmre/sigvisa<gh_stars>0 create table reb_arrival ( sta varchar(6) not null, time double not null, arid int, jdate int, stassid int, chanid int, chan varchar(8), iphase varchar(8), stype varchar(1), deltim double, azimuth ...
<filename>software/cabio-database/scripts/ddl/Tables/GO_RELATIONSHIP.sql /*L Copyright SAIC Distributed under the OSI-approved BSD 3-Clause License. See http://ncip.github.com/cabio/LICENSE.txt for details. L*/ ALTER TABLE GO_RELATIONSHIP DROP PRIMARY KEY CASCADE / DROP TABLE GO_RELATIONSHIP CASCADE CONSTRA...
create table t1 (s1 string collate utf8_en_ci); insert into t1 values ('Ab'), ('aa'); alter table t1 change s1 s1 string collate utf8_en_cs; -- error cannot change codeset alter table t1 change s1 s1 string collate iso88591_en_cs; drop table t1; create table t1 (s1 string collate iso88591_en_cs); insert into ...
<gh_stars>0 -- @testpoint:opengauss关键字characteristics(非保留),作为模式名 --关键字不带引号-成功 drop schema if exists characteristics; create schema characteristics; --清理环境 drop schema characteristics; --关键字带双引号-成功 drop schema if exists "characteristics"; create schema "characteristics"; --清理环境 drop schema "characteristics"; --关键字带...
-- @testpoint:opengauss关键字off(非保留),作为数据库名 --关键字不带引号-成功 drop database if exists off; create database off; drop database off; --关键字带双引号-成功 drop database if exists "off"; create database "off"; drop database "off"; --关键字带单引号-合理报错 drop database if exists 'off'; create database 'off'; --关键字带反引号-合理报错 drop database if ex...
-- @testpoint: 浮点型参数,包含正负数 select bit_length(1.4503); select bit_length(0.32001); select bit_length(-0.32);
-- phpMyAdmin SQL Dump -- version 4.7.0 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Feb 05, 2019 at 03:14 PM -- Server version: 10.1.25-MariaDB -- PHP Version: 5.6.31 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
<reponame>Aminiqbaal/Awnar-Motor-Laravel<filename>sql/categories.sql -- phpMyAdmin SQL Dump -- version 5.0.2 -- https://www.phpmyadmin.net/ -- -- Host: 127.0.0.1 -- Generation Time: Jun 05, 2021 at 02:18 PM -- Server version: 10.4.14-MariaDB -- PHP Version: 7.4.9 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; START TRANSACTI...
<filename>postgres/tables/users.sql BEGIN TRANSACTION; CREATE TABLE users ( id serial PRIMARY KEY, name VARCHAR(100), email text UNIQUE NOT NULL, entries BIGINT DEFAULT 0, joined TIMESTAMP NOT NULL ); COMMIT;
<reponame>DanielTorrens/ajedrez /*!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 utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET...
CREATE TABLE [Queue].[Trigger] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [BuildItem] NVARCHAR (100) NOT NULL, [TriggerType] VARCHAR (100) NOT NULL, [TriggerValue] NVARCHAR (MAX) NOT NULL, [TriggerDate] DATETIME2 (2) NOT NULL, CONSTRAINT [PK_Trigger] PRIMARY KEY CLUS...