Problem solve
Get help with specific problems with your technologies, process and projects.
SQL Transact SQL T SQL
Using SQL DATEPART, GETDATE, DATENAME functions
SQL datetime functions DATEPART, GETDATE and DATENAME can retrieve the date and time or other individual parts of a value. Here's how to master these T-SQL tools. Continue Reading
DATEADD and DATEDIFF SQL functions for datetime values
DATEADD and DATEDIFF SQL functions allow you to easily perform calculations, like adding a time interval from a datetime value. Here's how to use those functions for that and more. Continue Reading
Troubleshoot SQL Server database performance with T-SQL
Basit Farooq provides eight tips for optimizing T-SQL code to prevent SQL Server database performance bottlenecks and to tune database applications. Continue Reading
-
Create a user-defined server role in SQL Server 2012 with T-SQL, SSMS
Ashish Mehta shows two ways – with T-SQL and with SSMS -- to make a user-defined server role in SQL Server 2012. Continue Reading
Can SQL combine tables like these? Doubtful
Can SQL combine tables where the values don't relate to one another? One expert says it's difficult unless you redesign the tables. Continue Reading
SQL PIVOT helps merge results into a single row
SQL Server expert Denny Cherry shows how code can be used to the same effect as a SQL PIVOT statement.Continue Reading
Nine T-SQL best practices
Choosing the right data type and avoiding dynamic SQL are two of the nine T-SQL best practices that author Basit Farooq explains here.Continue Reading
SQL Server views: Creating indexes and adding base data
SQL Server views allow you to give information to users without compromising security. Find out how to create indexes on them and add base data.Continue Reading
SQL Server views: What they are and how to create them
SQL Server views can help DBAs provide information to users while still controlling data access. Find out how.Continue Reading
SQL CONSTRAINT clauses: FOREIGN KEY, CHECK and DEFAULT
In SQL Server, SQL CONSTRAINT clauses let you control values entered into a column. Learn about FOREIGN KEY, CHECK and DEFAULT constraints here.Continue Reading
-
SQL CONSTRAINT clauses: PRIMARY KEY and UNIQUE
In SQL Server, SQL CONSTRAINT clauses let you control the kinds of values that get entered into a column. Learn about two of them here.Continue Reading
Manage your SQL Server databases with SQL DMVs
SQL DMVs (dynamic management views) can help simplify administration of SQL Server databases. Find out how with detailed examples.Continue Reading
T-SQL analytic functions in SQL Server can help solve problems quickly
With the help of T-SQL analytic functions, we can quickly solve complex analytical tasks. Learn more from SQL Server expert Basit Farooq.Continue Reading
T-SQL tricks for SQL Server 2012: T-SQL statements
In the final part of Robert Sheldon's series on features and tricks in T-SQL, learn about important T-SQL statements like LAG, LEAD and more.Continue Reading
T-SQL tricks for SQL Server 2012: T-SQL formatting
Learn the advantages of new T-SQL formatting tools in this third part of expert Robert Sheldon's series on new T-SQL tricks for 2012.Continue Reading