SQL UNION Operator

The SQL UNION operator combines the result of two or more SELECT statements. The SQL UNION Operator The UNION operator is used to combine the result-set of two or more SELECT statements. Notice that each SELECT statement within the UNION must have the same number of columns. The columns must also have similar data types. Also, the columns in each SELECT statement must be in the same order. SQL UNION Syntax SELECT column_name(s) FROM table1 UNION SELECT column_name(s) FROM table2; Note: The UNION operator selects only…

Read More

Posted in SQL Comments Off on SQL UNION Operator
SQL Aliases

SQL aliases are used to temporarily rename a table or a column heading. SQL Aliases SQL aliases are used to give a database table, or a column in a table, a temporary name. Basically aliases are created to make column names more readable. SQL Alias Syntax for Columns SELECT column_name AS alias_name FROM table_name; SQL Alias Syntax for Tables SELECT column_name(s) FROM table_name AS alias_name; Example SELECT CustomerName AS Customer, ContactName AS FROM Customers; or SELECT CustomerName, Address+’, ‘+City+’, ‘+PostalCode+’, ‘+Country AS Address FROM Customers;…

Read More

Posted in SQL Comments Off on SQL Aliases
SQL BETWEEN Operator

The BETWEEN operator is used to select values within a range. The SQL BETWEEN Operator The BETWEEN operator selects values within a range. The values can be numbers, text, or dates. SQL BETWEEN Syntax SELECT column_name(s) FROM table_name WHERE column_name BETWEEN value1 AND value2; Example SELECT * FROM Products WHERE Price BETWEEN 10 AND 20;  

Read More

Posted in SQL Comments Off on SQL BETWEEN Operator
SQL IN Operator

The IN Operator The IN operator allows you to specify multiple values in a WHERE clause. SQL IN Syntax SELECT column_name(s) FROM table_name WHERE column_name IN (value1,value2,…); Example SELECT * FROM Customers WHERE City IN (‘Paris’,’London’);

Read More

Posted in SQL Tagged Comments Off on SQL IN Operator
SQL Wildcards

A wildcard character can be used to substitute for any other character(s) in a string. SQL Wildcard Characters In SQL, wildcard characters are used with the SQL LIKE operator. SQL wildcards are used to search for data within a table. With SQL, the wildcards are: Wildcard Description % A substitute for zero or more characters _ A substitute for a single character Matches only a character NOT specified…

Read More

Posted in SQL Tagged Comments Off on SQL Wildcards
SQL LIKE Operator

The LIKE operator is used in a WHERE clause to search for a specified pattern in a column. The SQL LIKE Operator The LIKE operator is used to search for a specified pattern in a column. SQL LIKE Syntax SELECT column_name(s) FROM table_name WHERE column_name LIKE pattern; SQL LIKE Operator Examples The following SQL statement selects all customers with a City starting with the letter “s”: Example SELECT * FROM Customers WHERE City LIKE ‘s%’; or SELECT * FROM Customers WHERE Country LIKE ‘%land%’;

Read More

Posted in SQL Comments Off on SQL LIKE Operator
SQL SELECT TOP Clause

The SQL SELECT TOP Clause The SELECT TOP clause is used to specify the number of records to return. The SELECT TOP clause can be very useful on large tables with thousands of records. Returning a large number of records can impact on performance. Note: Not all database systems support the SELECT TOP clause. SQL Server / MS Access Syntax SELECT TOP number|percent column_name(s) FROM table_name;   SQL SELECT TOP Equivalent in MySQL and Oracle MySQL Syntax SELECT column_name(s) FROM table_name LIMIT number; Example SELECT *…

Read More

The 25 Most Common Passwords

Here are the 25 most common passwords of 2013, along with the change in rank from last year. 1. 123456 (Up 1) 2. password (Down 1) 3. 12345678 (Unchanged) 4. qwerty (Up 1) 5. abc123 (Down 1) 6. 123456789 (New) 7. 111111 ( Up 2) 8. 1234567 (Up 5) 9. iloveyou (Up 2) 10. adobe123 (New) 11. 123123 (Up 5) 12. admin (New) 13. 1234567890 (New) 14. letmein (Down 7) 15. photoshop (New) 16. 1234 (New) 17. monkey (Down…

Read More

Pseudocode Standard Overview

Pseudocode is a kind of structured English for describing algorithms. It allows the designer to focus on the logic of the algorithm without being distracted by details of language syntax.  At the same time, the pseudocode needs to be complete.  It describe the entire logic of the algorithm so that implementation becomes a rote mechanical task of translating line by line into source code. In general the vocabulary used in the pseudocode should be the vocabulary of the problem…

Read More

Additional Math Functions in C#

Topic Overview Division in C# follows standard “integer division” rules when done with integer types. Many things are implicitly cast from narrow types to wider types. You can explicitly cast from one type to another by putting the type you want in parentheses in front (float a = (float)3.4948393;) Division by zero causes an exception to be thrown for integer types, and results in infinity for floating point types. NaN, PositiveInfinity, and NegativeInfinity are defined for the float and double types (float.NaN or Double.PositiveInfinity for example)….

Read More