February 1, 2023
  • Facebook
  • Twitter
  • Youtube
Expert-Only

  • Database
    • Create database with SQL Server Management Studio
    • Create SQL database with a script
    • Drop SQL Server database script
  • Tables & views
    • Table
      • Create SQL Server table
      • Create table with primary key
      • Create customer table
      • Alter SQL table
      • Truncate SQL Server table
      • Drop SQL table
      • Check if SQL table exists
    • View
      • Create SQL Server view
      • Alter SQL view
      • Drop SQL view
      • Create SQL partitioned view
  • Procedure & functions
    • Procedure
      • Create stored procedure
      • Alter stored procedure
      • Create procedure with parameters
    • Function
      • Manage SQL function
      • Create SQL function
      • Call SQL function
      • Alter SQL function
      • Delete SQL function
  • Indexes & partitions
    • Index
      • Clustered SQL index definition
      • Create SQL index
      • Rebuild SQL index
      • Reorganize SQL index
      • Disable SQL index
      • Drop SQL index
      • List all SQL indexes
    • Partition
      • SQL Server partition definition
      • Create SQL table partition
  • MS Office tips
    • Excel tips
      • Best cell selection shortcuts for Excel
      • Display the day in all letters with Excel
      • Excel shortcut to select an entire column
      • Disable the direct edit option in Excel
      • Turn off Excel Scroll Lock option
    • Word tips
      • Create an automatic table of contents with Word
      • Delete a horizontal line in Microsoft Word
      • Insert a comment in Word margin
  • IT concepts
    • Dimension table definition in Business Intelligence
    • DSS or Decision Support System definition
    • EPM or Enterprise Performance Management definition
    • OLTP and Transactional Databases definition
  • MS-DOS commands
  • Useful SQL
    • Insert into from a select query
    • SQL Server insert or update query example
  • Time and dates
    • Display full month name in SQL Server?
    • Time difference in hours minutes
  • Strings
    • Split text after character with SQL Server Substring
    • Remove SQL line break from text
    • Split long SQL Server text in lines
  • SQL Server
    • SQL Server Abbreviations
    • SQL Server Downloads
    • SQL Server Errors
  • DAX functions
HomeSQL Server

SQL Server

Section provides some SQL Server scripts examples. To start with SQL Server development, learn by the example with practical scripts and cases is effective.

It includes SQL scripts, T-SQL examples and object creation like tables, views, stored procedures, and functions.

Useful SQL

SQL Server insert or update query example

January 12, 2022

How to write an insert or update SQL Server query? Here are two different, quick and easy solutions to write an “UPDATE OR INSERT” query. In other words, avoid the SQL Server error …

SQL Server stored procedure

Execute SQL Server procedure with parameters

January 11, 2022

How to execute a stored procedure with parameters? Depending on the implementation of the SQL Server code, call the procedure with all parameters or only one. First you have to set the value …

SQL Server Tables

Empty a table with truncate table in SQL Server

January 8, 2022

How to completely empty a SQL Server table? The TRUNCATE TABLE command empties all the data in the table. How to completely delete data in a SQL Server table with TRUNCATE TABLE? The …

SQL Server Strings

Split text after character with SQL Server Substring

January 6, 2022

How to split a text after a particular character with SQL Server… like for example a file name: “file.txt” to separate the file name from its extension. Indeed, it is obvious that splitting …

Useful SQL

Insert into from a select query in SQL Server

January 4, 2022

How to write an Insert into query from a Select with SQL Server? There are three solutions for running an INSERT INTO query with a SELECT in SQL Server. The first solution is …

SQL Server Database

Empty the SQL Server transaction log to fix error 9002

January 3, 2022

Microsoft SQL Server database is slow, or the available disk space is getting abnormally small? To solve this problem, it is sometimes enough to empty the SQL Server transaction log and reduce the …

SQL Server Tables

List all SQL Server tables with a query

December 29, 2021

To display the list of SQL Server tables of a specific database, several solutions are possible. Indeed, to audit a database and its tables, it is common to want the list of tables …

SQL Server Database

Create SQL Server database with a script

June 17, 2021

In order to create a new SQL Server database with one script, just follow this article and especially the code snippet. To create a Microsoft database with a Transact-SQL script, use the CREATE …

Time economy is key when you create a SQL Server partition.
SQL Server Database

Create a new database with SQL Server Management Studio

June 16, 2021

How to create a new SQL Server database with SQL Server Management Studio – SSMS ? In this tutorial, let us see how to add a new SQL Server database. Indeed, to start, …

SQL Server Database

Delete SQL Server database with a script

June 15, 2021

How to delete a SQL Server database with a script? And delete all associated files? These files are the .mdf, .ndf, .ldf files and also the .bak backup files. Use the SQL DROP …

Posts navigation

1 2 … 6 »

2017 - 2022 | Expert-Only.net | Learn Microsoft IT by example © All rights reserved.