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 …
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 …
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 …
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 …
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 …
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 …
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 …
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 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 …
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) …
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 …
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 …
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 …