Search code examples
sqlsql-servercalculated-columns

SQL Server, how to merge two columns into one column?


I have a SQL query

SELECT TABLE_SCHEMA + TABLE_NAME AS ColumnZ 
FROM information_schema.tables

I want the result should be table_Schema.table_name.

help me please!!


Solution

  • Try this:

    SELECT TABLE_SCHEMA + '.' + TABLE_NAME AS ColumnZ 
    FROM information_schema.tables