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;
1 cze 2021 · 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. Use the % character to replace any number of characters (including 0 characters).
23 gru 2010 · I have a table with a column containing data that begin with numbers too, on MySQL. How can I select the rows that begin only with a number?
Here, you'll find a collection of PDF-format notes covering SQL concepts. These notes are handwritten and contain concise definitions and examples for every command. The content is derived from various sources, including YouTube lectures, college lectures, and platform presentations.
25 mar 2021 · A detailed article about SQL Cheat Sheet which includes keywords, data types, operators, functions, indexes, keys, and lots more. Download it in PDF format.
15 lis 2023 · 1 SELECT first_name, last_name FROM customers 2 INTERSECT 3 SELECT first_name, last_name FROM employees; The query above uses the INTERSECT operator to find the common first_name and last_name between the customers and employees tables.
Example SQL Function. • A SQL function to count how many bank accounts a particular customer has: CREATE FUNCTION. account_count(customer_name VARCHAR(20)) RETURNS INTEGER BEGIN DECLARE a_count INTEGER; SELECT COUNT(*) INTO a_count. FROM depositor WHERE depositor.customer_name = customer_name; RETURN a_count; END.