Previous |
Next
What is SQL Concatenation?Concatenation is the process of combining data strings. For example, the concatenation of 'John', ' ', 'W', '. ' and 'Smith' is 'John W. Smith' Also, the concatenation of '212', '-', '555', '-' and '1234' is '212-555-1234' Why Use SQL Concatenation?Concatenation can result in more readable output while maintaining data in separate columns for greater flexibility. How To Use SQL ConcatenationThe means of achieving concatenation differs by database type. for example:
More than 2 strings can be combined through concatenation. Numbers must be converted to strings before concatenation. SQL Concatenation Syntax
SQL Concatenation Example The following example concatenates the column branch_name with column region_name along with spaces and parens for readability. Here are the contents of the tables:
Table: REGION
Table: BRANCH
This SQL Statement with concatenation is executed:
Here is the result.
|
SQL OVERVIEW
SQL BASICS
SQL SELECT
SQL WHERE
SQL INSERT
SQL UPDATE
SQL DELETE
SQL ADMINISTRATION
SQL CREATE DATABASE
SQL DROP DATABASE
SQL CREATE TABLE
SQL ALTER TABLE
SQL DROP TABLE
SQL CREATE INDEX
SQL DROP INDEX
SQL ADD FOREIGN KEY
SQL DROP FOREIGN KEY
SQL CREATE VIEW
SQL DROP VIEW
SQL ADVANCED
SQL CONCAT
SQL SUBSTRING
SQL TRIM
SQL AND & OR
SQL IN
SQL BETWEEN
SQL LIKE
SQL DISTINCT
SQL GROUP BY
SQL AGGREGATE
SQL HAVING
SQL ORDER BY
SQL JOIN
SQL OUTER JOIN
SQL SYNTAX
| HOME | SQL OVERVIEW | SQL BASICS | SQL ADMINISTRATION | SQL ADVANCED | SQL SYNTAX |
| Copyright© 1999-2006, First Place Software, Inc. |






