Search results
SQL Handwritten Notes Repository: A collection of PDF notes covering SQL concepts with concise definitions and examples. Explore fundamental commands, date/time functions, joins, and more. Contributions welcome!
This 3-page SQL Cheat Sheet provides you with the most commonly used SQL statements. Download the SQL cheat sheet, print it out, and stick to your desk.
Download this eBook for free Chapters. Chapter 1: Getting started with SQL; Chapter 2: ALTER TABLE; Chapter 3: AND & OR Operators; Chapter 4: Cascading Delete; Chapter 5: CASE; Chapter 6: Clean Code in SQL; Chapter 7: Comments; Chapter 8: Common Table Expressions; Chapter 9: CREATE Database; Chapter 10: CREATE FUNCTION; Chapter 11: CREATE TABLE
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 ...
1 cze 2021 · Use the || operator to concatenate two strings: SELECT 'Hi ' || 'there!'; -- result: Hi there! ||. Use this trick for numbers: Some databases implement non-standard solutions for concatenating strings like CONCAT() or CONCAT_WS(). Check the documentation for your specific database. Use the _ character to replace any single character.
1 cze 2021 · To get the number of seconds in a week: SELECT 60 * 60 * 24 * 7; -- result: 604800. From time to time, you need to change the type of a number. The CAST() function is there to help you out. It lets you change the type of value to almost anything (integer, numeric, double precision, varchar, and many more).
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.