Thursday , 22 October 2020
Stackode
Home > MySql

MySql

How to delete index in MySql

How to delete index in MySql, first you need to know the exact name of the INDEX (Unique key in this case) to delete or update it. INDEX names are usually same as column names. In case of more than one INDEX applied on a column, MySQL automatically suffixes numbering to the column names to create unique INDEX names. For ...

Read More »

Data Types – SQL

Data Types – SQL is an attribute that specifies type of data of any object. Each column, variable and expression has related data type in SQL. You would use these data types while creating your tables. You would choose a particular data type for a table column based on your requirement. SQL Server offers six categories of data types for ...

Read More »

ORDER BY Clause – SQL

ORDER BY Clause – SQL is used to sort the data in ascending or descending order, based on one or more columns. Some database sorts query results in ascending order by default. Syntax: The basic syntax of ORDER BY clause is as follows: SELECT column-list FROM table_name [WHERE condition] [ORDER BY column1, column2, .. columnN] [ASC | DESC]; You can ...

Read More »

Date Functions – SQL

Date Functions – SQL Following is a list of all important Date and Time related functions available through SQL. There are various other functions supported by your RDBMS. Given list is based on MySQL RDBMS. Name Description ADDDATE() Adds dates ADDTIME() Adds time CONVERT_TZ() Converts from one timezone to another CURDATE() Returns the current date CURRENT_DATE(), CURRENT_DATE Synonyms for CURDATE() ...

Read More »

Numeric Functions SQL

Numeric Functions SQL are used primarily for numeric manipulation and/or mathematical calculations. The following table details the numeric functions: Name Description ABS() Returns the absolute value of numeric expression. ACOS() Returns the arccosine of numeric expression. Returns NULL if the value is not in the range -1 to 1. ASIN() Returns the arcsine of numeric expression. Returns NULL if value ...

Read More »

Operators – SQL

What is an Operator in SQL? Operators – SQL is a reserved word or a character used primarily in an SQL statement’s WHERE clause to perform operation(s), such as comparisons and arithmetic operations. Operators are used to specify conditions in an SQL statement and to serve as conjunctions for multiple conditions in a statement. Arithmetic operators Comparison operators Logical operators ...

Read More »

Group By – SQL

Group By – SQL clause is used in collaboration with the SELECT statement to arrange identical data into groups. The GROUP BY clause follows the WHERE clause in a SELECT statement and precedes the ORDER BY clause. Syntax: The basic syntax of GROUP BY clause is given below. The GROUP BY clause must follow the conditions in the WHERE clause ...

Read More »

Temporary Tables – SQL

Temporary Tables – SQL There are RDBMS, which support temporary tables. Temporary Tables are a great feature that lets you store and process intermediate results by using the same selection, update, and join capabilities that you can use with typical SQL Server tables. The temporary tables could be very useful in some cases to keep temporary data. The most important ...

Read More »

String Functions SQL

String Functions SQL are used primarily for string manipulation. The following table details the important string functions: Name Description ASCII() Returns numeric value of left-most character BIN() Returns a string representation of the argument BIT_LENGTH() Returns length of argument in bits CHAR_LENGTH() Returns number of characters in argument CHAR() Returns the character for each integer passed CHARACTER_LENGTH() A synonym for ...

Read More »

Expressions – SQL

Expressions – SQL is a combination of one or more values, operators, and SQL functions that evaluate to a value. SQL EXPRESSIONs are like formulas and they are written in query language. You can also use them to query the database for specific set of data. Syntax: Consider the basic syntax of the SELECT statement as follows: SELECT column1, column2, ...

Read More »