SQL
SQL (Structured Query Language) is a standardized programming language used for managing and manipulating relational databases. It is the most widely used language for database management systems and is essential for working with data stored in relational databases. SQL allows users to create, read, update, and delete (CRUD) data within a database, as well as to manage database schema and control access to the data.
SQL Tutorial
A concise definition of Introduction to SQL is "An initial overview of SQL principles and syntax."SQL serves as the standardized language used to access and manage databases.
SQL Syntax is the set of rules governing the structure and composition of SQL statements for querying and manipulating databases.
The SELECT statement holds significant importance in SQL, serving to fetch results from our database.
SQL SELECT DISTINCT is used to retrieve unique values from a specified column or combination of columns in a table.
The SQL WHERE clause is used to filter records in a SELECT, UPDATE, or DELETE statement based on specified conditions.
SQL ORDER BY is a clause used to sort the result set of a query based on one or more columns in ascending or descending order.
The SQL AND operator is used to combine multiple conditions in a WHERE clause to retrieve rows that satisfy all the conditions.
The SQL OR operator is used to combine multiple conditions in a WHERE clause to retrieve rows that satisfy at least one of the conditions.
The SQL NOT operator is used to negate a condition in a WHERE clause, selecting rows that do not satisfy the specified condition.
SQL INSERT INTO is a command used to add new records or rows into a database table.
SQL NULL Values represent missing or undefined data in a database table.
SQL UPDATE is a command used to modify existing records in a database table.
SQL DELETE is a statement used to remove one or more records from a database table based on specified conditions.
SQL TOP, LIMIT, FETCH FIRST, or ROWNUM Clause is used to restrict the number of rows returned by a query.
SQL Aggregate Functions perform calculations on multiple rows to yield a single result.
SQL MIN() function retrieves the smallest value from a selected column, while SQL MAX() function fetches the largest value from a selected column.
The SQL COUNT() function calculates the number of rows that satisfy a specified condition.
SQL SUM() function calculates the total sum of values in a specific column.
The SQL AVG() function calculates the average value of a numeric column.
The SQL LIKE operator is used to search for a specified pattern within a column.
SQL wildcards are special characters used with the LIKE operator to represent unspecified or variable parts of data in a search pattern.
The SQL IN operator allows you to specify multiple values in a WHERE clause to compare against a column.
The SQL BETWEEN operator selects values within a specified range.
SQL Aliases are temporary names assigned to table or column names in SQL queries, providing a shorter or more descriptive name for easier reference.
SQL Joins are used to combine rows from two or more tables based on a related column between them.
SQL INNER JOIN retrieves records with matching values in both tables.
SQL LEFT JOIN retrieves all records from the left table and matched records from the right table, with unmatched records in the right table set to NULL.
The SQL RIGHT JOIN keyword retrieves all records from the right table and matching records from the left table.
The SQL FULL OUTER JOIN keyword retrieves all records when there is a match in either the left or right table.
SQL Self Join: A self-join is a SQL query in which a table is joined with itself, typically to compare rows within the same table.
SQL UNION Operator: The UNION operator combines the results of two or more SELECT statements into a single result set, removing duplicate rows.
SQL GROUP BY Statement: It's used to group rows that have the same values into summary rows, like "find the number of customers in each country."
The SQL HAVING clause filters records based on aggregate conditions applied to groups created by the GROUP BY clause.
The SQL EXISTS operator checks for the existence of any rows in a subquery and returns true if the subquery returns one or more rows; otherwise, it returns false.
The SQL ANY and ALL operators are used to compare a value with a set of values returned by a subquery. ANY returns true if any of the subquery values meet the condition, while ALL returns true if all of the subquery values meet the condition.
The SQL SELECT INTO statement retrieves data from one or more database tables and stores it into a new table or a variable.
The SQL INSERT INTO SELECT statement inserts data from an existing table into a specified table based on a query.
The SQL CASE expression is a conditional expression used to evaluate conditions and return a value based on the result.
SQL NULL functions are used to handle NULL values in the database, performing operations like checking for NULL, replacing NULL with another value, or determining if a value is NULL.
SQL Stored Procedures for SQL Server are precompiled sets of one or more SQL statements that are stored in the database and can be invoked repeatedly to perform specific tasks or operations.
SQL Comments are annotations within SQL code used to provide explanatory or clarifying remarks for humans reading the code, without affecting its execution.
SQL operators are symbols or keywords used to perform operations like arithmetic, comparison, or logical operations on data in a SQL database.
SQL Database
The SQL CREATE DATABASE statement is used to create a new database in a SQL database management system.
The SQL DROP DATABASE statement is used to delete an existing database from a SQL database management system.
The SQL BACKUP DATABASE statement in SQL Server is used to create a backup of an entire database, including its data and schema.
The SQL CREATE TABLE statement is used to create a new table in a SQL database.
The SQL DROP TABLE statement is used to delete a table from a database.
The SQL ALTER TABLE statement is used to modify an existing table structure in a database, allowing changes such as adding, deleting, or modifying columns, constraints, or indexes.
SQL constraints are utilized to define regulations governing data within a table.
The SQL NOT NULL constraint ensures that a column cannot contain null values.
The SQL UNIQUE constraint ensures that all values in a column are distinct.
The SQL PRIMARY KEY constraint uniquely identifies each record in a table.
The SQL FOREIGN KEY constraint establishes a link between two tables, enforcing referential integrity and ensuring values in one table correspond to values in another.
SQL CHECK is a constraint that ensures values inserted into a column meet a specified condition.
SQL DEFAULT is a clause that specifies a default value for a column when no explicit value is provided during an INSERT operation.
SQL CREATE INDEX is a statement used to create an index on one or more columns of a table, enabling faster data retrieval by organizing the data in a structured order.
SQL AUTO INCREMENT automatically generates unique values for a column upon insertion, typically used for primary keys.
SQL Working With Dates involves manipulating and querying date and time data within a relational database management system (RDBMS), allowing operations like insertion, updating, retrieval, and comparison of date and time values.
SQL Views are virtual tables derived from the result of a stored query, allowing users to access and manipulate data stored in the underlying tables through a simplified and predefined perspective.
SQL Injection is a cyber attack technique that exploits vulnerabilities in web applications by injecting malicious SQL code, allowing attackers to manipulate databases, steal data, or execute unauthorized actions.
SQL hosting refers to the provision of servers and infrastructure specifically designed for hosting and managing SQL databases, enabling users to store, access, and manipulate their data securely and efficiently over the internet.
The data type assigned to a column dictates the kind of values the column can store, such as integers, characters, monetary values, dates and times, binary data, and more.
SQL References
SQL keywords are reserved words used in Structured Query Language (SQL) to perform specific functions or operations within database queries and commands.
The ADD
command is used to add a column in an existing table.
The ADD CONSTRAINT command creates a constraint after a table has been created.
The SQL ALL keyword compares a value to all values in a subquery or a list.
Defines the SQL ALTER keyword as used for modifying database objects like tables, views, or indexes.
Defines the SQL ALTER COLUMN keyword for modifying the attributes of a column in a table.
The SQL ALTER TABLE keyword facilitates modifications to the structure of an existing table. It enables actions such as adding, deleting, or modifying columns, as well as adding or removing constraints.
Defines the SQL AND keyword, used to combine multiple conditions in a WHERE clause, all of which must be true for the row to be included in the result set.
Defines the SQL ANY keyword, which compares a value to a set of values returned by a subquery or a list.
Defines the SQL AS keyword, used to rename a column or table in a query's result set.
The SQL ASC keyword is used to sort query results in ascending order based on the specified column.
The SQL BACKUP DATABASE keyword is used to create a backup of the entire database, including all its tables and data.
The SQL BETWEEN keyword is used to retrieve records where a specified value falls within a specified range.
The SQL CASE keyword is used to perform conditional logic within a query, allowing for the evaluation of multiple conditions and the execution of different actions based on those conditions.
The SQL CHECK keyword is used to enforce specified conditions on the values that are entered into a column, ensuring data integrity within a table.
The SQL COLUMN keyword is used to specify the attributes or properties of a particular column in a table.
The SQL CONSTRAINT keyword is used to define rules and restrictions for data stored in tables, ensuring data integrity and consistency.
The SQL CREATE keyword is used to generate new database objects such as tables, indexes, views, or stored procedures.
The SQL CREATE DATABASE keyword is used to create a new database in a database management system.
The SQL CREATE INDEX keyword is used to create an index on a table, which enhances the performance of queries by facilitating faster data retrieval based on the indexed columns.
SQL CREATE OR REPLACE VIEW is a statement used to create a new view or replace an existing one with the same name if it already exists, allowing for modifications to the view's definition without needing to drop and recreate it.
SQL CREATE TABLE is a command used to create a new table in a database, specifying its structure, including column names, data types, and constraints.
SQL CREATE PROCEDURE is a statement used to define and store a reusable set of SQL statements that perform a particular task, which can be invoked multiple times with different parameters.
SQL CREATE UNIQUE INDEX is a statement used to create an index on a table that ensures the uniqueness of values in one or more columns, preventing duplicate entries in those columns.
SQL CREATE VIEW is a statement used to define a virtual table based on the result set of a SELECT query, allowing users to retrieve and manipulate data from the view as if it were a regular table.
SQL DATABASE Keyword is a command used to create, manipulate, and manage databases in a relational database management system (RDBMS).
SQL DEFAULT Keyword is used to specify a default value for a column when no value is provided during insertion.
SQL DELETE Keyword is used to remove one or more records from a table in a database.
SQL DESC Keyword is used to retrieve the structure of a table, including column names, data types, and constraints, in descending order.
SQL SELECT DISTINCT Keyword is used to retrieve unique values from a specified column or columns in a table, eliminating duplicate entries.
SQL DROP Keyword is used to remove database objects such as tables, views, or indexes from a database.
The SQL DROP COLUMN keyword is used to delete a column from an existing table in a database.
The SQL DROP CONSTRAINT keyword is used to remove a constraint (such as UNIQUE, PRIMARY KEY, FOREIGN KEY, etc.) from a table in a database.
The SQL DROP DATABASE keyword is used to delete an entire database along with all its associated data and structures.
The SQL DROP DEFAULT keyword is used to remove a default value constraint from a column in a table.
The SQL DROP INDEX keyword is employed to delete an index from a database table.
SQL DROP TABLE deletes a table, while TRUNCATE TABLE empties it, removing all rows but keeping the table structure.
The SQL DROP VIEW keyword is used to delete a view from the database.
The SQL EXEC keyword is used to execute stored procedures or functions in a database management system.
The SQL EXISTS keyword is a conditional operator that checks for the existence of a result set returned by a correlated subquery.
The SQL FOREIGN KEY keyword establishes a relationship between two tables, ensuring referential integrity by enforcing a link between a column in one table and a column in another table.
The SQL FROM keyword specifies the tables from which data should be retrieved or manipulated in a query.
The SQL FULL OUTER JOIN keyword combines the results of both the LEFT OUTER JOIN and the RIGHT OUTER JOIN, ensuring that all rows from both tables are included, with NULL values filled in for unmatched rows.
The SQL GROUP BY keyword is used to arrange identical data into groups based on a specified column or expression, facilitating the application of aggregate functions to each group.
The SQL HAVING keyword filters group rows based on specified conditions, used after the GROUP BY clause to apply conditions to groups created by the GROUP BY clause.
The SQL IN keyword is a conditional operator that checks if a specified value matches any value in a list or a subquery.
The SQL INDEX keyword is used to create and retrieve indexes, which are data structures that improve the speed of data retrieval operations on database tables by providing quick access paths to rows based on the values of one or more columns.
The SQL INNER JOIN keyword retrieves rows from both tables that satisfy the specified join condition.
The SQL INSERT INTO keyword is used to add new rows of data into a table.
The SQL INSERT INTO SELECT keyword is used to copy data from one table and insert it into another table.
The SQL IS NULL keyword is used to check if a value in a column is NULL.
The SQL IS NOT NULL keyword is used to check if a value in a column is not NULL.
The SQL JOIN keyword is used to combine rows from two or more tables based on a related column between them.
The SQL LEFT JOIN keyword retrieves all rows from the left table and the matching rows from the right table, with unmatched rows from the right table filled with NULL values.
The SQL LIKE keyword is used to search for a specified pattern within a column.
The SQL SELECT TOP, LIMIT, and ROWNUM keywords limit the number of rows returned in a query.
The SQL NOT keyword is a logical operator used to negate a condition in a WHERE clause, selecting rows that do not satisfy the specified condition.
The SQL NOT NULL keyword is used to filter rows where a specified column does not contain NULL values.
The SQL OR keyword is a logical operator used to combine multiple conditions in a WHERE clause, selecting rows that satisfy at least one of the specified conditions.
The SQL ORDER BY keyword is used to sort the result set of a query in ascending or descending order based on one or more columns.
The SQL FULL OUTER JOIN keyword retrieves all rows from both tables involved, matching rows where possible and filling in NULL values for unmatched rows.
The SQL PRIMARY KEY keyword is used to uniquely identify each record in a table and ensures that no duplicate values are allowed in the specified column or combination of columns.
The SQL CREATE PROCEDURE keyword is used to define and create a new stored procedure in a database.
The SQL RIGHT JOIN keyword retrieves all rows from the right table and the matching rows from the left table, with unmatched rows from the left side filled with NULL values.
The SQL SELECT TOP, LIMIT, and ROWNUM keywords are used to restrict the number of rows returned in a query.
The SQL SELECT keyword is used to retrieve data from a database.
The SQL SELECT DISTINCT keyword is used to retrieve unique values from a specified column or columns in a database table.
The SQL SELECT INTO keyword is used to create a new table based on the result set of a SELECT statement.
The SQL SELECT TOP, LIMIT, and ROWNUM keywords are used to limit the number of rows returned in a query.
The SQL SET keyword is used to assign values to variables in SQL queries or to update existing data in a table.
The SQL TABLE keyword is used to create, modify, or drop a table in a database.
The SQL SELECT TOP, LIMIT, and ROWNUM keywords are used to restrict the number of rows returned in a query.
The SQL DROP TABLE keyword is used to delete a table and its data from the database, while the TRUNCATE TABLE keyword is used to remove all data from a table while retaining the table structure.
The SQL UNION keyword is used to combine the results of two or more SELECT statements into a single result set.
The SQL UNION ALL keyword is used to combine the results of two or more SELECT statements into a single result set, including all duplicate rows.
The SQL UNIQUE keyword is used to ensure that all values in a column are unique across the table.
The SQL UPDATE keyword is used to modify existing records in a database table.
The SQL VALUES keyword is used to specify the values to be inserted into a table when using the INSERT INTO statement.
The SQL VIEW keyword is used to create a virtual table based on the result set of a SELECT query.
The SQL WHERE keyword is used to filter records based on a specified condition.
MySQL Functions
MySQL encompasses an array of pre-existing functions across categories like strings, numerics, dates, and more, facilitating diverse functionalities within the database environment.
ASCII, or American Standard Code for Information Interchange, is a character encoding standard used for representing text in computers and communication equipment.
CHAR_LENGTH is a function that returns the number of characters in a string, excluding trailing spaces.
CHARACTER_LENGTH is a function that calculates the number of characters in a string.
CONCAT is a function used in SQL to combine two or more strings into a single string.
CONCAT_WS is a function used in SQL to combine multiple strings with a specified separator.
FIELD is a function in SQL that returns the position of a string within a set of strings, or 0 if the string is not found.
FIND_IN_SET is a function in SQL that returns the position of a string within a comma-separated list of strings, or 0 if the string is not found.
FORMAT is a function in SQL used to format numbers with commas and a specified number of decimal places.
INSERT is a SQL command used to add new rows of data into a database table.
INSTR is a function used in programming languages like Visual Basic and VBA to search for the occurrence of one string within another, returning the position of the first occurrence or zero if not found.
LCASE is a function used in programming languages like Visual Basic and VBA to convert a string to lowercase letters.
LEFT is a function in programming languages like Excel and SQL used to extract a specified number of characters from the left side of a string.
LENGTH is a function used in programming languages such as SQL and JavaScript to determine the number of characters in a string or the number of elements in an array.
LOCATE is a function used in SQL to find the position of a substring within a string and returns the position of its first occurrence.
LOWER is a function in SQL used to convert all characters in a string to lowercase.
LPAD is a function used in SQL to pad a string with specified characters on the left side until it reaches a desired length.
LTRIM is a function in SQL used to remove leading spaces (spaces at the beginning) from a string.
MID is a function used in some programming languages to extract a substring from a string, starting at a specified position and extending for a certain number of characters.
POSITION is a function used in SQL to find the position of a substring within a string and returns the position of its first occurrence.
REPEAT is a function used in SQL to replicate a string a specified number of times.
REPLACE is a function used in SQL to replace all occurrences of a specified substring within a string with another substring.
REVERSE is a function used in SQL to reverse the characters in a string.
RIGHT is a function used in SQL to extract a specified number of characters from the right side of a string.
RPAD is a function used in SQL to pad a string with specified characters on the right side until it reaches a desired length.
RTRIM is a function used in SQL to remove trailing spaces (spaces at the end) from a string.
SPACE is a function used in SQL to generate a string consisting of a specified number of spaces.
STRCMP is a function that compares two strings and returns an integer value indicating their relative order.
SUBSTR is a function that extracts a portion of a string, specified by a starting position and length, and returns it as a new string.
SUBSTRING is a function that extracts a portion of a string based on specified starting position and length parameters.
SUBSTRING_INDEX is a function that extracts a substring from a string before a specified delimiter, with an option to specify which occurrence of the delimiter to use.
TRIM is a function that removes leading and trailing spaces from a string.
UCASE is a function that converts all characters in a string to uppercase.
UPPER is a function that converts all characters in a string to uppercase.
ABS is a function that returns the absolute value of a number, removing its sign.
ACOS is a function that returns the arccosine (inverse cosine) of a value, measured in radians, within the range [0, π].
ASIN is a function that returns the arcsine (inverse sine) of a value, measured in radians, within the range [-π/2, π/2].
ATAN is a function that returns the arctangent (inverse tangent) of a value, measured in radians, within the range [-π/2, π/2].
ATAN2 is a mathematical function that computes the arctangent of the quotient of its two arguments, ensuring correct quadrant placement.
AVG computes the arithmetic mean of a set of values, commonly used in statistical analysis to determine a central tendency.
CEIL rounds a numeric value up to the nearest integer, and returns the result.
CEILING rounds a numeric value up to the nearest integer, and returns the result.
COS is a mathematical function that calculates the cosine of a given angle in radians.
COT calculates the cotangent of an angle in radians, defined as the reciprocal of the tangent of an angle.
COUNT is a function used to determine the number of non-null values in a set of values or records.
DEGREES is a mathematical function that converts an angle measured in radians to its equivalent in degrees.
DIV is an arithmetic operator used for integer division, returning the quotient without the remainder.
EXP is a mathematical function that returns the value of Euler's number (approximately 2.71828) raised to the power of a given number.
FLOOR is a mathematical function that rounds a numeric value down to the nearest integer, and returns the result.
GREATEST is a function that returns the largest value among a list of expressions.
LEAST is a function that returns the smallest value from a list of arguments.
LN stands for "Logarithm Natural," a mathematical function representing the exponent to which the base number (usually Euler's number, e ≈ 2.718) must be raised to produce a given number.
The LOG function calculates the logarithm of a number with a specified base.
LOG10 is a mathematical function that computes the base-10 logarithm of a given number.
LOG2 is a mathematical function that computes the base-2 logarithm of a given number.
MAX is a function used to determine the highest value among a set of numbers or expressions.
MIN is a function used to determine the lowest value among a set of numbers or expressions.
MOD is a mathematical function that computes the remainder when one number is divided by another.
PI is a mathematical constant representing the ratio of a circle's circumference to its diameter, approximately equal to 3.14159.
POW is a mathematical function used to calculate a number raised to the power of another number.
In SQL, the POWER
function returns the result of raising a number to a specified exponent.
SQL radians function converts an angle in degrees to radians.
SQL RAND() function generates a random number.
SQL ROUND() function returns a number rounded to a specified number of decimal places.
SQL SIGN() function returns the sign of a number.
SQL SIN() function calculates the sine of an angle in radians.
SQL SQRT is a mathematical function used to calculate the square root of a numeric value in a SQL query.
SQL SUM is an aggregate function used to calculate the total sum of numeric values in a specified column or expression within a SQL query.
SQL TAN is a trigonometric function used to calculate the tangent of an angle in a SQL query.
SQL TRUNCATE is a command used to remove all records from a table in a database, effectively resetting it while preserving its structure.
SQL ADDDATE is a function that adds a specified number of days to a date, returning a new date value.
SQL ADDTIME is a function used to add a specified time interval to a given time or datetime value.
SQL CURDATE is a function that returns the current date in the system's timezone.
SQL CURRENT_DATE is a function that returns the current date in the system's timezone.
SQL CURRENT_TIME is a function that returns the current time in the system's timezone.
CURRENT_TIMESTAMP
in SQL returns the current date and time of the database server.
CURTIME()
in SQL returns the current time from the database server.
In SQL, DATE
represents a data type for storing dates without any associated time information.
DATEDIFF in SQL calculates the difference in days between two dates.
DATE_ADD in SQL is a function used to add a specified time interval to a date.
DATE_FORMAT in SQL is a function used to format date and time values based on a specified format string.
DATE_SUB is a function in SQL used to subtract a specified time interval from a date.
In SQL, DAY is a function used to extract the day of the month from a given date.
In SQL, DAYNAME is a function used to retrieve the name of the day of the week from a given date.
DAYOFMONTH is a function in SQL used to extract the day of the month from a given date.
DAYOFWEEK is a function in SQL used to extract the day of the week from a given date.
DAYOFYEAR is an SQL function used to extract the day of the year from a given date.
EXTRACT is a SQL function used to retrieve a specific part (e.g., year, month, day) from a date or timestamp.
FROM_DAYS is a function in MySQL that converts a day number into a date.
HOUR is a SQL function used to extract the hour portion from a given time or timestamp.
LAST_DAY in SQL returns the last day of the month for a given date.
LOCALTIME
in SQL returns the current date and time for the local time zone.
LOCALTIMESTAMP in SQL retrieves the current date and time including fractional seconds, based on the local time zone.
MAKEDATE in SQL is used to construct a date from year and day of year values.
MAKETIME in SQL is used to construct a time value from hour, minute, and second components.
MICROSECOND in SQL is a function that retrieves the microsecond part of a given time or datetime value.
MINUTE in SQL retrieves the minute component of a given time or datetime value.
MONTH in SQL retrieves the month component of a given date or datetime value.
MONTHNAME in SQL is a function that retrieves the name of the month from a given date or datetime value.
NOW in SQL retrieves the current date and time.
PERIOD_ADD in SQL is a function used to add a number of months to a period in the format YYYYMM.
PERIOD_DIFF in SQL calculates the difference in months between two periods in the format YYYYMM.
QUARTER in SQL is a function that returns the quarter of the year (1 to 4) for a given date.
SECOND in SQL retrieves the second component of a given time or datetime value.
SEC_TO_TIME in SQL converts a number of seconds into a time format (HH:MM).
STR_TO_DATE in SQL converts a string representation of a date and time into a proper datetime value using a specified format.
SUBDATE is a MySQL function that subtracts a specified number of days, months, or years from a given date, producing a new date.
SUBTIME is a MySQL function that subtracts a specified time interval from a given time or datetime value.
SYSDATE is a function in databases like Oracle and MySQL that returns the current date and time from the system's clock.
TIME refers to the representation of the current time or a specific time of day in a given context, typically as a part of a date-time format.
TIME_FORMAT is a function in MySQL that converts a time value to a specified format.
TIME_TO_SEC is a MySQL function that converts a time value into seconds.
TIMEDIFF is a MySQL function that calculates the difference between two time or datetime values.
TIMESTAMP is a data type in SQL that stores both date and time values.
TO_DAYS is a function in MySQL that converts a date or datetime value to a numeric value representing days since year 0.
WEEK is a function in SQL that returns the week number of a given date.
WEEKDAY is a function in SQL that returns the index of the weekday for a given date (0 = Monday, 6 = Sunday).
WEEKOFYEAR is a function in SQL that returns the week number within a year for a given date.
YEAR is a function in SQL that extracts the year from a date or datetime value.
YEARWEEK is a function in SQL that returns the year and week number concatenated together for a given date.
BIN is a MySQL function that converts a decimal number to its binary representation.
BINARY
is a keyword in SQL used to specify a binary string literal or to cast a string to a binary type.
CASE is a conditional expression in SQL used to evaluate multiple conditions and return a result based on them.
CAST
is a SQL function used to convert a value from one data type to another.
COALESCE returns the first non-null value in a list of expressions.
CONNECTION_ID returns the ID of the current client connection in a database session.
CONV() converts a number from one numeric base to another.
CONVERT function changes a value from one data type to another in SQL.
CURRENT_USER returns the username of the current database user.
DATABASE retrieves the name of the current database in use.
IF is a control flow function that returns one value if a condition is true and another value if the condition is false.
In SQL, IFNULL is a function that returns a specified value if the given expression is NULL; otherwise, it returns the expression itself.
In SQL, ISNULL
is a function that replaces NULL with a specified value.
LAST_INSERT_ID() is a function in SQL that returns the ID generated for the last AUTO_INCREMENT column in the current session.
NULLIF is a SQL function that returns NULL if two expressions are equal, otherwise it returns the first expression.
SESSION_USER is a SQL function that returns the name of the current database user for the session.
SYSTEM_USER is a SQL function that returns the login name of the current user in the database system.
USER is a SQL function that returns the current user name in the context of the database system.
VERSION
is a SQL function that retrieves the version of the database system.
SQL Server Functions
SQL Server functions are built-in operations that perform specific tasks, such as mathematical calculations, string manipulation, date and time operations, and data type conversions within SQL Server databases.
ASCII is a standard encoding scheme that assigns numeric values to characters, allowing computers to represent and manipulate text.
CHAR is a SQL function that returns the character corresponding to a specified ASCII code.
CHARINDEX is a SQL function that returns the starting position of a substring within a string expression.
CONCAT is a function that merges multiple strings into a single string.
Concatenate Using +: Combines two or more strings together in SQL.
CONCAT_WS is a SQL function that concatenates multiple strings into a single string with a specified separator.
DATALENGTH is a SQL function that returns the number of bytes used to represent an expression or a column in bytes.
DIFFERENCE is a SQL function that calculates a similarity score between two strings based on their differences in characters.
FORMAT is a SQL function that converts a value to a formatted string representation based on the specified format pattern.
LEFT is a SQL function that retrieves a specified number of characters from the left side of a string.
Retrieve up to 100 characters from the beginning (left side) of a string.
LOWER is a Python string method that returns a copy of the string with all characters converted to lowercase.
LTRIM is a function that removes leading whitespace characters from a string.
NCHAR is a SQL Server function that returns the Unicode character based on the specified integer code.
PATINDEX is a SQL Server function that returns the starting position of a pattern in a string.
QUOTENAME is a SQL Server function that returns a string with delimiters added to ensure the string is safely used in a SQL statement as a quoted identifier.
REPLACE is a SQL Server function that replaces all occurrences of a specified substring within a string with another substring.
REPLICATE is a SQL Server function that duplicates a specified string a specified number of times, returning the result.
REVERSE is a SQL Server function that reverses the characters in a string and returns the result.
"RIGHT" refers to a moral, legal, or ethical entitlement to have or do something.
"RTRIM" is a function that removes trailing spaces from the end of a string.
SOUNDEX is a function in SQL that converts a string to a four-character code based on its pronunciation.
"SPACE" refers to an area or gap between objects or points, often used to denote physical or conceptual separation.
In SQL, "STR" is a function used to convert a number to a string format with a specified length and optional decimal places.
"STUFF" is a SQL function used to replace a portion of a string with another string at a specified starting point and for a specified length.
"SUBSTRING" is a SQL function used to extract a portion of a string based on a specified starting position and length.
In SQL Server, TRANSLATE is a function that replaces a set of characters in a string with another set of characters.
SQL TRIM function removes leading and trailing spaces (or other specified characters) from a string.
UNICODE is a computing standard that assigns numeric codes to characters in various writing systems for representation in digital devices.
UPPER is a SQL function that converts all characters in a string to uppercase.
ABS is a SQL function that returns the absolute (non-negative) value of a numeric expression.
ACOS is a mathematical function in SQL that returns the arccosine (inverse cosine) of a number, which represents the angle in radians whose cosine is the specified number.
ASIN is a mathematical function in SQL that returns the arcsine (inverse sine) of a number, representing the angle in radians whose sine is the specified number.
ATAN
is a mathematical function in SQL that returns the arctangent (inverse tangent) of a number, representing the angle in radians whose tangent is the specified number.
ATN2 is a mathematical function in SQL that returns the arctangent of two variables, representing the angle in radians between the positive x-axis and the point (x, y) in a Cartesian coordinate system.
AVG is a SQL aggregate function that calculates the average value of a numeric column or expression.
CEILING function in computing typically refers to a mathematical operation that rounds a number up to the nearest integer or specified multiple.
COUNT function in computing calculates the number of items in a collection or dataset, often used to tally occurrences or elements.
COS function computes the cosine of an angle in radians, yielding a ratio of the adjacent side to the hypotenuse in a right triangle
Calculate and return the cosine value for a specified number.
DEGREES function converts radians to degrees in trigonometry, physics, and other fields requiring angular measurement in degrees.
EXP function computes the exponential value ee raised to a specified power, where ee is the base of natural logarithms (approximately 2.71828).
FLOOR function in computing calculates the largest integer less than or equal to a given number or expression.
LOG function computes the natural logarithm of a number, providing the exponent to which the base ee (approximately 2.71828) must be raised to obtain that number.
LOG10 function computes the base-10 logarithm of a number, providing the exponent to which 10 must be raised to obtain that number.
MAX function retrieves the highest value from a set of values or a column in a database table.
MIN function retrieves the lowest value from a set of values or a column in a database table.
SQL PI refers to the built-in constant in SQL Server that represents the mathematical constant π (pi), approximately equal to 3.14159.
SQL POWER function computes a number raised to the power of another number, yielding the result of the exponentiation operation.
SQL RADIANS function converts degrees to radians for trigonometric calculations.
RAND function generates a random number between 0 (inclusive) and 1 (exclusive).
SQL ROUND function rounds a numeric value to a specified precision or the nearest integer.
SIGN function returns the sign of a number, indicating whether it is positive, negative, or zero.
SIN function computes the sine of an angle given in radians.
SQL SQRT function calculates the square root of a numeric value.
SQL SQUARE function computes the square of a number, yielding the result of multiplying the number by itself.
SQL SUM function calculates the total sum of values in a column or a set of values.
SQL TAN function computes the tangent of an angle given in radians.
CURRENT_TIMESTAMP function retrieves the current date and time at the time of execution in SQL
SQL DATEADD function adds a specified time interval to a date and returns a new date.
DATEDIFF function calculates the difference between two dates, returning the result in a specified date part unit (such as days, months, years).
Constructs a date value from its parts such as year, month, and day in SQL Server
DATENAME function retrieves the name of a specified date part from a date
DATEPART function extracts a specific part (such as year, month, day) from a date or datetime value in SQL.
DAY stands for "Data, Action, and Year," emphasizing the importance of information, activity, and time in achieving goals.
GETDATE() returns the current date and time of the system where the SQL query is executed.
GETUTCDATE() returns the current date and time in Coordinated Universal Time (UTC) from the database system.
ISDATE() checks if a given expression can be interpreted as a valid date.
A month is a unit of time, approximately four weeks or 30-31 days, used in calendars to organize the year.
SYSDATETIME is a function in SQL Server that returns the current date and time on the server.
In SQL, YEAR refers to the function or attribute used to extract or manipulate the year component from a date or datetime value.
In SQL, CAST is used to convert one data type into another, providing flexibility in data manipulation and querying.
In SQL, COALESCE is a function used to return the first non-null expression among its arguments.
CONVERT is a SQL function used to convert a value from one data type to another, with optional formatting specifications.
CURRENT_USER
in SQL returns the username of the current database context.
IIF
is a SQL function that evaluates a specified condition and returns one value if the condition is true, or another value if the condition is false.
ISNULL is a SQL function used to replace NULL values with a specified replacement value.
ISNUMERIC is a SQL function that checks whether a specified expression can be converted to a numeric data type.
NULLIF is a SQL function that compares two expressions and returns NULL if they are equal, or the first expression if they are not equal.
SESSION_USER in SQL returns the login name of the current session.
SESSIONPROPERTY is a SQL function used to retrieve various properties of the current session in SQL Server, such as isolation level or session options.
SYSTEM_USER in SQL returns the login name of the current user in the database context.
USER_NAME in SQL returns the database user name associated with a specified user ID.
MS Access Functions
SQL MS Access Functions refer to built-in functions specific to Microsoft Access databases, providing capabilities for data manipulation, calculations, and querying within Access SQL queries.
Asc is a function in SQL that returns the ASCII value of the first character in a string expression.
Chr is a function in SQL that returns the character associated with the specified ASCII code.
Concat
with &
in SQL concatenates multiple strings or values into a single string.
CurDir
is a function in SQL that retrieves the current directory path.
Format is a function in SQL that formats a value with the specified format mask.
InStr is a function in Visual Basic for Applications (VBA) that returns the position of the first occurrence of a substring within a string.
InStrRev is a function in Visual Basic for Applications (VBA) that returns the position of the last occurrence of a substring within a string, searching from the end to the start.
LCase is a function in Visual Basic for Applications (VBA) that converts a string to lowercase.
Left is a function in Visual Basic for Applications (VBA) that retrieves a specified number of characters from the left side of a string.
Len is a function in Visual Basic for Applications (VBA) that returns the number of characters in a string.
LTrim is a function in Visual Basic for Applications (VBA) that removes leading spaces from a string.
Mid is a function in Visual Basic for Applications (VBA) that extracts a specified number of characters from a string, starting at a specified position.
SQL (Structured Query Language) is a standardized programming language used for managing and manipulating relational databases.
SQL (Structured Query Language) is a standard language for accessing and manipulating databases.
RTrim is a function in SQL that removes trailing spaces from a string.
The Space function returns a string consisting of a specified number of spaces.
SQL SPLIT typically refers to a function or operation that divides a string into substrings based on a specified delimiter.
SQL STR function typically converts a number to a string representation.
StrComp is a function in SQL used to compare two strings and return a value indicating their relationship based on specified comparison options.
StrConv is a function in SQL used to convert a string to a specified case, such as uppercase or lowercase.
StrReverse is a function in SQL that reverses the characters in a string.
Trim is a function in SQL used to remove leading and trailing spaces (or other specified characters) from a string.
UCase converts all characters in a string to uppercase.
Abs returns the absolute (non-negative) value of a number.
Atn computes the arctangent of a number, returning the angle in radians.
Avg
calculates the average (mean) value of a set of numbers.
Cos calculates the cosine of an angle in radians.
Count calculates the number of records that meet specified criteria in a database query.
Exp calculates the exponential value of a number in SQL.
Fix rounds a number down to the nearest integer.
Format
converts a value to a specified format using a formatting expression.
Int returns the integer part of a number, truncating any decimal digits.
In SQL, the MAX() function returns the highest value from a specified column.
In SQL, the MIN() function returns the lowest value from a specified column.
Randomize initializes the random number generator to produce different sequences of random numbers each time it is called.
Rnd function: Generates a random number between 0 (inclusive) and 1 (exclusive).
SQL ROUND
function: Rounds a numeric value to a specified number of decimal places.
SQL SGN
function: Returns the sign of a number, indicating whether it is positive, negative, or zero.
SQL SQR
function: Computes the square root of a number.
In SQL, SUM
is a function used to calculate the total of numeric values in a column.
SQL VAL
isn't a standard function or keyword. It seems you might be referring to something specific or it could be a typo.
In SQL, DATE
refers to a data type that stores date values.
In SQL, DATEADD
adds a specified time interval to a date and returns the resulting date.
In SQL, DATEDIFF
calculates the difference between two dates in terms of a specified time interval.
In SQL, DATEPART
is a function used to extract a specific part (such as year, month, day) from a date or datetime value.
In SQL, DateSerial
is not a standard function. It seems you might be referring to a function from another programming language or context.
In SQL, there is no DateValue
function. If you are referring to a function in a different context or language, please specify.
In SQL, DAY
is a function that returns the day of the month from a date.
In SQL, FORMAT
is a function that formats a value according to a specified format.
In SQL, Hour
is a function that extracts the hour component from a datetime expression or converts a string representation of time into an integer hour value.
In SQL, Minute
is a function that extracts the minute component from a datetime expression or converts a string representation of time into an integer minute value.
In SQL, Month is a function that retrieves the month component from a date or datetime expression, returning an integer between 1 and 12 representing the month of the year.
In SQL, MonthName
is typically a function that returns the name of the month based on a specified integer month value or datetime expression.
Retrieve the current date and time from the computer system.
In SQL, Second
is a function that retrieves the second component from a datetime expression or converts a string representation of time into an integer second value.
In SQL, Time
typically refers to a data type that represents a specific time of day without a date component, or it can refer to functions that manipulate time-related data.
In SQL, TimeSerial is typically a function used to create a time value based on provided hours, minutes, and seconds.
In SQL, TimeValue typically refers to a function that converts a string representation of time into a time data type.
In SQL, Weekday typically refers to a function that returns an integer representing the day of the week for a given date.
In SQL, WeekdayName
typically refers to a function that retrieves the name of the weekday based on a specified numeric weekday value or datetime expression.
In SQL, Year
typically refers to a function that extracts the year component from a date or datetime expression, returning an integer representing the year.
The CURRENT_USER function in SQL returns the name of the current user in the database session.
Environ is a data structure in computing that contains environment variables, which are dynamic values used by processes to retrieve system configuration details and control their execution environment.
The SQL ISDATE
function checks if an expression is a valid date, returning 1 if true and 0 if false.
In SQL, IsNull is a function used to determine if a specified expression is NULL, returning true (1) if it is, and false (0) if it isn't.
IsNumeric is a SQL function used to determine if a given expression can be interpreted as a numeric value.
SQL Quick Ref
"SQL Quick Ref" typically refers to a quick reference guide for SQL, summarizing key syntax, functions, and commands for quick consultation.