SQL Server – Difference between LEFT and RIGHT function with example

  SQL Server LEFT and RIGHT function fetches number character from expression, LEFT function use to fetch LEFT side value whereas RIGHT function gives value from RIGHT side of expression. LEFT vs RIGHT function in sql server SQL Server LEFT  function returns character and Takes two parameter, first parameter is string value or any expression and ...

SQL Server – Difference and SOUNDEX function with example

Difference function returns integer value as output, value ranges between 0 to 4. Lower number indicates less chance of matching or no match and highest number 4 indicates exact match. Difference function is based on SOUNDEX function in sql server which returns alphanumeric value. Lets go through simple examples of DIFFERENCE function and SOUNDEX function. 1. ...

SQL Server – System databases – Master,MSDB,Model,Resource and tempdb

System databases are default database after sql server installation, master,msdb,model, resource and tempdb are part of system database. All sql server information are stored in system database. using system catalog or system table you can read sql server internal information. System Database master, model, msdb, resource and tempdb database. Master database in sql server Master ...

Split partition in sql server

Sql server 2005 introduced partitioning to segregate large table data into separate filegroup. Split and merge partitoin used to manage table data as per requirement. Split partition helps you to move data in different filegroup, Sql server enterprise edition supports partitioning of tables that improves query performance and makes easy for DBAs to handle large ...

Sql server catalog view for linked server

What is Catalog view in Linked Server? Catalog views are use to store information related to linked server logins, security and other features which are enabled for linked server.  Sys.linked_logins – We can fire select query on this Catalog view which stores Linked-server-login mapping information from local server to the corresponding linked server for execute distributed queries by using RPC. ...

Money vs small money datatype in sql server

Money Datatype Data that represent salary or currency, you can use money data type to hold these values in sql server. Money can represent in the range from “-922337203685477.5808” up to “922337203685477.5807” and takes 8 bytes of space in memory. SmallMoney Datatype If you think value will not exceed more than 2,14,748,  you can use ...

Stored procedure in sql server

Stored procedure is very good example of sql scripting. Early in my career, i worked as a sql developer in that phase learnt a lot like how to write store procedures and triggers? How to implement business functionality using stored procedure without changing front-end code of the application? Writing scripts in sql server is less costly compare ...

Indexed view in sql server

Indexed views are also called as materialized view that means result of data manipulated and stored in the view. We can create unique clustered index on view to improve performance of the queries based on it. Indexed views can use to help those queries that generates large result set. It is not advisable to create index on such ...

SQL Server TempDb database

What is tempdb in sql server ? Tempdb database used as system database for all users connected to sql server instance for temporary processing query result. It stores all temporary stored data result, temporary table and temporary stored procedures. Whenever sql server starts, it creates new Tempdb for each sql server instance. All temporary data ...

SQL Server – MSDB database – Stores backup and sql job information

MSDB is part of system databases which is necessary for sql server to perform sql server jobs related tasks. MSDB database is used to stores sql jobs and database backup related data in sql server. Sql server agent makes use of MSDB database for scheduling sql jobs and alerts. Whenever we install sql server, MSDB ...