Search results
1 cze 2021 · Standard SQL Functions Cheat Sheet. TEXT FUNCTIONS. CONCATENATION. Use the || operator to concatenate two strings: SELECT 'Hi ' || 'there!'; -- result: Hi there! Remember that you can concatenate only character strings using. ||. Use this trick for numbers: SELECT '' || 4 || 2; -- result: 42.
22 lip 2014 · You can use this formula regardless of DATEFIRST setting : ((DatePart(WEEKDAY, getdate()) + @@DATEFIRST + 6 - [first day that you need] ) % 7) + 1; for monday = 1. ((DatePart(WEEKDAY, getdate()) + @@DATEFIRST + 6 - 1 ) % 7) + 1; and for sunday = 1. ((DatePart(WEEKDAY, getdate()) + @@DATEFIRST + 6 - 7 ) % 7) + 1;
1 cze 2021 · Standard SQL Functions Cheat Sheet. TEXT FUNCTIONS. CONCATENATION. Use the || operator to concatenate two strings: SELECT 'Hi ' || 'there!'; -- result: Hi there! Remember that you can concatenate only character strings using. ||. Use this trick for numbers: SELECT '' || 4 || 2;
1 cze 2021 · Fetch all names that start with any letter followed by 'atherine': SELECT name FROM names WHERE name LIKE '_atherine'; Fetch all names that end with 'a': SELECT name FROM names WHERE name LIKE '%a'; USEFUL FUNCTIONS. Get the count of characters in a string: SELECT LENGTH('LearnSQL.com');-- result: 12 Convert all letters to lowercase: SELECT ...
12 wrz 2022 · Learn how to build conditional logic when writing SQL code using IF, BEGIN, END, ELSE, and ELSEIF logic.
SQL statements are the means by which programs and users access data in an Oracle database. The sections that follow show each SQL statement and its related syntax.
SQL Cheat Sheet for Quick Reference [PDF Download] Whether you need a quick reference for major SQL concepts before an interview, or you want to level-up your existing SQL skills, our SQL cheat sheet is the ideal starting point. Plus, we’ve broken it down into 11 essential SQL topics to help you get the most from this SQL query cheat sheet.