Sql Create Table Statement

SQL CREATE TABLE Statement

The SQL CREATE TABLE statement can be used to create a table within a SQL database. Syntax Example Results employeeID employeeName hireDate       The CREATE TABLE statement used …

Leveraging Temporary And Variable Tables In Sql

Leveraging Temporary and Variable Tables in SQL

When manipulating data especially from SQL views that require several minutes to produce results that are executed several times while running jobs, you may find the use of temporary or …

Sql Datediff Function

SQL DATEDIFF Function

The DATEDIFF function is used in Microsoft SQL Server to return the time between two dates/date columns. Employees Table employeeID employeeName hireDate 1000 John Smith 1995-12-03 1001 Fred White 2001-10-12 …

Mysql Curdate Function

MySQL CURDATE Function

The MySQL CURDATE function is used to display the current date. The equivalent function in Microsoft SQL Server is GETDATE, but would require formatting with the CONVERT function. Syntax Example …

Sql Order By Keyword

SQL Order By Keyword

The ORDER BY keyword is used to sort the result-set by one or more specified fields (columns). The ORDER BY keyword sorts the records in ascending order by default. If …

Stored Procedure Parameters

Stored Procedure Parameters

One or more parameters can be declared in a CREATE PROCEDURE statement. The value of each declared parameter must be supplied by the user when the procedure is executed unless …

Sql Inner Join

SQL INNER Join

The SQL INNER JOIN keyword returns rows when there is at least one match in both tables. Relational databases are often normalized to eliminate duplication of information when objects may …

Sql Date Functions Overview

SQL Date Functions Overview

SQL Date functions will vary from platform to platform. It is important to know what format of the date and/or time is stored in the database so that you can …

Mysql Date_Format Function

MySQL DATE_FORMAT Function

The MySQL DATE_FORMAT function Formats the date value according to the format string. Syntax Format Description %a Abbreviated weekday name (Sun..Sat) %b Abbreviated month name (Jan..Dec) %c Month, numeric (0..12) …

Sql Cursors

SQL Cursors

Transact-SQL cursors are used mainly in stored procedures, triggers, and Transact-SQL scripts. Cursors make the contents of a result set available to other Transact-SQL statements. The typical process for using …

Mysql Curtime Function

MySQL CURTIME Function

The MySQL CURTIME function is used to display the current time. The equivalent function in Microsoft SQL Server is GETDATE, but would require formatting with the CONVERT function. Syntax Example …

Sql Getdate Function

SQL GETDATE Function

The SQL GETDATE function is used to get the current date and time. This function is used when querying a Microsoft SQL Server. For MySQL Server, you can use the …

Scroll to Top