代码搜索:sql
找到约 10,000 项符合「sql」的源代码
代码结果 10,000
www.eeworm.com/read/183001/5260386
sql rowtypes.sql
--
-- ROWTYPES
--
-- Make both a standalone composite type and a table rowtype
create type complex as (r float8, i float8);
create temp table fullname (first text, last text);
-- Nested composite
www.eeworm.com/read/183001/5260387
sql time.sql
--
-- TIME
--
CREATE TABLE TIME_TBL (f1 time(2));
INSERT INTO TIME_TBL VALUES ('00:00');
INSERT INTO TIME_TBL VALUES ('01:00');
-- as of 7.4, timezone spec should be accepted and ignored
INSERT INTO
www.eeworm.com/read/183001/5260388
sql stats.sql
--
-- Test Statistics Collector
--
-- Must be run after tenk2 has been created (by create_table),
-- populated (by create_misc) and indexed (by create_index).
--
-- conditio sine qua non
SHOW stats_s
www.eeworm.com/read/183001/5260389
sql comments.sql
--
-- COMMENTS
--
SELECT 'trailing' AS first; -- trailing single line
SELECT /* embedded single line */ 'embedded' AS second;
SELECT /* both embedded and trailing single line */ 'both' AS third; -- t
www.eeworm.com/read/183001/5260391
sql arrays.sql
--
-- ARRAYS
--
CREATE TABLE arrtest (
a int2[],
b int4[][][],
c name[],
d text[][],
e float8[],
f char(5)[],
g varchar(5)[]
);
--
-- only the 'e' array is 0-based, the oth
www.eeworm.com/read/183001/5260393
sql namespace.sql
--
-- Regression tests for schemas (namespaces)
--
CREATE SCHEMA test_schema_1
CREATE UNIQUE INDEX abc_a_idx ON abc (a)
CREATE VIEW abc_view AS
SELECT a+1 AS a, b+1 AS b
www.eeworm.com/read/183001/5260394
sql truncate.sql
-- Test basic TRUNCATE functionality.
CREATE TABLE truncate_a (col1 integer primary key);
INSERT INTO truncate_a VALUES (1);
INSERT INTO truncate_a VALUES (2);
SELECT * FROM truncate_a;
-- Roll trunca
www.eeworm.com/read/183001/5260395
sql subselect.sql
--
-- SUBSELECT
--
SELECT 1 AS one WHERE 1 IN (SELECT 1);
SELECT 1 AS zero WHERE 1 NOT IN (SELECT 1);
SELECT 1 AS zero WHERE 1 IN (SELECT 2);
-- Set up some simple test tables
CREATE TABLE SUBSEL
www.eeworm.com/read/183001/5260396
sql conversion.sql
--
-- create user defined conversion
--
CREATE USER conversion_test_user WITH NOCREATEDB NOCREATEUSER;
SET SESSION AUTHORIZATION conversion_test_user;
CREATE CONVERSION myconv FOR 'LATIN1' TO 'UTF8' F
www.eeworm.com/read/183001/5260397
sql bit.sql
--
-- BIT types
--
--
-- Build tables for testing
--
CREATE TABLE BIT_TABLE(b BIT(11));
INSERT INTO BIT_TABLE VALUES (B'10'); -- too short
INSERT INTO BIT_TABLE VALUES (B'00000000000');
INSERT INTO