I usually capitalize t-sql keywords (SELECT, FROM, WHERE, GROUP BY, HAVING) etc. etc. and use pascal casing for field names and table names.
I usually capitalize t-sql keywords (SELECT, FROM, WHERE, GROUP BY, HAVING) etc. etc. and use pascal casing for field names and table names.
++I usually capitalize t-sql keywords (SELECT, FROM, WHERE, GROUP BY, HAVING) etc. etc. and use pascal casing for field names and table names.
the biggest pet peeve is indents for me.
CREATE TABLE Persons
(
P_Id int primary key,
LastName varchar(255),
FirstName varchar(255),
Address varchar(255),
City varchar(255)
);
WITH cte (column1, column2)
AS (SELECT COLUMN1, COLUMN2 FROM TABLE)
SELECT
COLUMN1, COLUMN2,
COLUMN3, COLUMN4....
FROM A INNER JOIN B ON A. = B.
INNER JOIN C ON B. = C. INNER JOIN D ON
A. = D. INNER JOIN cte ON ....
WHERE A.VALUE > B.VALUE AND (D.VALUE = '' OR C.VALUE = '')
AND C.VALUE = ''
GROUP BY COLUMN1, COLUMN2,
COLUMN3, COLUMN4....
WITH cte (column1, column2)
AS
(
SELECT COLUMN1, COLUMN2
FROM TABLE
)
SELECT
COLUMN1,
COLUMN2,
COLUMN3,
COLUMN4....
FROM A
INNER JOIN B ON
A. = B.
INNER JOIN C ON
B. = C.
INNER JOIN D ON
A. = D.
INNER JOIN cte ON.....
WHERE A.VALUE > B.VALUE
AND (D.VALUE = '' OR C.VALUE = '')
AND C.VALUE = ''
GROUP BY
COLUMN1,
COLUMN2,
COLUMN3,
COLUMN4....
I usually capitalize t-sql keywords (SELECT, FROM, WHERE, GROUP BY, HAVING) etc. etc. and use pascal casing for field names and table names.
I usually capitalize t-sql keywords (SELECT, FROM, WHERE, GROUP BY, HAVING) etc. etc. and use pascal casing for field names and table names.
SELECT BITCHES FROM UP_IN_HERE WHERE UPPER(BOOTY) = 'BOUNCING'
1. All my SQL queries are shouted (caps lock rocked)
SELECT BITCHES FROM UP_IN_HERE WHERE UPPER(BOOTY) = 'BOUNCING'
is not the same as
SELECT Bitches FROM Up_in_here WHERE upper(BOOTY) = 'BOUNCING'
is not the same as
select bitches from up_in_here where upper(booty) = 'BOUNCING'
I thought SQL was case insensitive. You're saying the engine treats those as different queries?
maybe MySQL does but it also does a lot of other weird things. /bashing
I also have never heard of this...