SQL MIN()
SQL MIN() returns the smallest value of the selected column. Table – Students +—–+——+——-+——-+——-+ | sid | name | mark1 | mark2 | mark3 | +—–+——+——-+——-+——-+ | 1 | AAAA | 30 | 35 | 40 | |...
View ArticleSQL SUM()
SQL SUM() returns the total sum of a numeric column. Table – Students +—–+——+——-+——-+——-+ | sid | name | mark1 | mark2 | mark3 | +—–+——+——-+——-+——-+ | 1 | AAAA | 30 | 35 | 40 | | 2 | BBBB...
View ArticleSQL GROUP BY
SQL GROUP BY should be added with all aggregate functions and it s used in conjunction with the aggregate functions to group the result-set by one or more columns. Table – Users +—–+——+ | uid | name |...
View ArticleSQL HAVING
SQL HAVING clause is used with aggregate functions. Syntaxt SELECT column_name, aggregate_function(column_name) FROM table_name GROUP BY column_name HAVING aggregate_function(column_name) operator...
View ArticleSQL UCASE()
SQL UCASE() converts the value of a field to uppercase. Syntaxt SELECT UCASE(column_name) FROM table_name Table – Users +—–+——+ | uid | name | +—–+——+ | 1 | aaaa | | 2 | bbbb | | 3 | cccc | |...
View ArticleSQL LCASE()
SQL LCASE() converts the value of a field to lowercase. Syntaxt SELECT LCASE(column_name) FROM table_name Table – Users +——+ | name | +——+ | AAAA | | BBBB | | CCCC | | DDDD | | EEEE | +——+ Example...
View ArticleSQL MID()
SQL MID() is used to extract characters from a text field. Syntaxt SELECT MID(column_name,start,length) FROM table_name Table – Users +—–+——-+ | uid | name | +—–+——-+ | 1 | name1 | | 2 | name2 |...
View ArticleSQL ROUND()
SQL ROUND() is used to round a numeric field to the number of decimals specified. Syntaxt SELECT ROUND(column_name,decimals) FROM table_name Table – Users +—–+—–+———–+ | oid | uid | price |...
View ArticleData Definition Statements
SQL Create DB – It is used to create a database SQL Create Table – It is used to create a table. SQL Create Index – It is used to create indexes in tables SQL Drop – can be used to delete...
View ArticleSQL injection
SQL injection is a technique often used to attack databases through a website. This is done by including portions of SQL statements in a web form entry field in an attempt to get the website to pass a...
View Article