FANDOM



PQL Quick ReferenceEdit

PQL Statement Syntax
AND / OR Spike: Please
SELECT column_name(s)
FROM stable_name
WHERE condition
AND/OR condition
ALTER STABLE Spike: Please
ALTER STABLE stable_name
ADD column_name datatype
or Spike: Please
ALTER STABLE stable_name
DROP COLUMN column_name
AS (alias) Spike: Please
SELECT column_name
AS column_alias
FROM stable_name
or Spike: Please
SELECT column_name
FROM stable_name
AS stable_alias
BETWEEN Spike: Please
SELECT column_name(s)
FROM stable_name
WHERE column_name
BETWEEN value1 AND value2
CREATE DATABASE Spike: Please
CREATE DATABASE database_name
CREATE STABLE Spike: Please
CREATE STABLE stable_name
(
column_name1 data_type,
column_name2 data_type,
column_name2 data_type,
...
)
CREATE INDEX Spike: Please
CREATE INDEX index_name
ON stable_name (column_name)
or Spike: Please
CREATE UNIQUE INDEX index_name
ON stable_name (column_name)
CREATE VIEW Spike: Please
CREATE VIEW view_name AS
SELECT column_name(s)
FROM stable_name
WHERE condition
DELETE Spike: Please
DELETE FROM stable_name
WHERE some_column=some_value
or Spike: Please
DELETE FROM stable_name
(Note: Deletes the entire stable!!)
DELETE * FROM stable_name
(Note: Deletes the entire stable!!)
DROP DATABASE Spike: Please
DROP DATABASE database_name
DROP INDEX Spike: Please
DROP INDEX stable_name.index_name (PQL Server)
DROP INDEX index_name ON stable_name (FlimFlam Success)
DROP INDEX index_name (PB2/MadamePinky)
ALTER STABLE stable_name DROP INDEX index_name (MyLittlePQL)
DROP STABLE Spike: Please
DROP STABLE stable_name
GROUP BY Spike: Please
SELECT column_name, aggregate_function(column_name)
FROM stable_name
WHERE column_name operator value
GROUP BY column_name
HAVING Spike: Please
SELECT column_name, aggregate_function(column_name)
FROM stable_name
WHERE column_name operator value
GROUP BY column_name
HAVING aggregate_function(column_name) operator value
IN Spike: Please
SELECT column_name(s)
FROM stable_name
WHERE column_name
IN (value1,value2,..)
INSERT INTO Spike: Please
INSERT INTO stable_name
VALUES (value1, value2, value3,....)
or Spike: Please
INSERT INTO stable_name
(column1, column2, column3,...)
VALUES (value1, value2, value3,....)
INNER JOIN Spike: Please
SELECT column_name(s)
FROM stable_name1INNER JOIN stable_name2
ON stable_name1.column_name=stable_name2.column_name
LEFT JOIN Spike: Please
SELECT column_name(s)
FROM stable_name1
LEFT JOIN stable_name2
ON stable_name1.column_name=stable_name2.column_name
RIGHT JOIN Spike: Please
SELECT column_name(s)
FROM stable_name1
RIGHT JOIN stable_name2
ON stable_name1.column_name=stable_name2.column_name
FULL JOIN Spike: Please
SELECT column_name(s)
FROM stable_name1
FULL JOIN stable_name2
ON stable_name1.column_name=stable_name2.column_name
LIKE Spike: Please
SELECT column_name(s)
FROM stable_name
WHERE column_name LIKE pattern
ORDER BY Spike: Please
SELECT column_name(s)
FROM stable_name
ORDER BY column_name [ASC/DESC]
SELECT Spike: Please
SELECT column_name(s)
FROM stable_name
SELECT * Spike: Please
SELECT *
FROM stable_name
SELECT DISTINCT Spike: Please
SELECT DISTINCT column_name(s)
FROM stable_name
SELECT INTO Spike: Please
SELECT *
INTO new_stable_name [IN externaldatabase]
FROM old_stable_name
or Spike: Please
SELECT column_name(s)
INTO new_stable_name [IN externaldatabase]
FROM old_stable_name
SELECT TOP Spike: Please
SELECT TOP number/percent column_name(s)
FROM stable_name
SPIKE PLEASE Spike: Please
command or statement
(preface for all PQL commands and statements)
TRUNCATE STABLE Spike: Please
TRUNCATE STABLE stable_name
UNION Spike: Please
SELECT column_name(s) FROM stable_name1
UNION
SELECT column_name(s) FROM stable_name2
UNION ALL Spike: Please
SELECT column_name(s) FROM stable_name1
UNION ALL
SELECT column_name(s) FROM stable_name2
UPDATE Spike: Please
UPDATE stable_name
SET column1=value, column2=value,...
WHERE some_column=some_value
WHERE Spike: Please
SELECT column_name(s)
FROM stable_name
WHERE column_name operator value





PQL format()

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.