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;
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 ...
28 lip 2017 · Let's start with a header of procedure or function we are documenting. Standard Header. There is not really something like a standard header, there are a few templates but they really boil down to basically the same. Let's have a look at SQL Server Management Studio standard header:
12 wrz 2022 · Learn how to build conditional logic when writing SQL code using IF, BEGIN, END, ELSE, and ELSEIF logic.
SQL Examples. Learn by examples! This tutorial supplements all explanations with clarifying examples. See All SQL Examples. SQL Quiz Test. Test your SQL skills at W3Schools! Start SQL Quiz! My Learning. Track your progress with the free "My Learning" program here at W3Schools. Log in to your account, and start earning points!
10 sty 2012 · It has to do with the Normal Form for the SQL language. IF statements can, by definition, only take a single SQL statement. However, there is a special kind of SQL statement which can contain multiple SQL statements, the BEGIN-END block.
created by Tomi Mester. I originally created this cheat sheet for my SQL course and workshop participants.* But I have decided to open-source it and make it available for everyone who wants to learn SQL. It's designed to give you a meaningful structure but also to let you add your own notes (that's why the empty boxes are there).