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 »Insert Query Into Table – SQL
Insert Query Into Table – SQL Statement is used to add new rows of data to a table in the database. Syntax: There are two basic syntaxes of INSERT INTO statement as follows: INSERT INTO TABLE_NAME (column1, column2, column3,...columnN)] VALUES (value1, value2, value3,...valueN); Here, column1, column2,…columnN are the names of the columns in the table into which you want to ...
Read More »Alias Syntax – SQL
Alias Syntax – SQL — You can rename a table or a column temporarily by giving another name known as alias. The use of table aliases means to rename a table in a particular SQL statement. The renaming is a temporary change and the actual table name does not change in the database. The column aliases are used to rename ...
Read More »COUNT Function SQL
COUNT Function SQL is the simplest function and very useful in counting the number of records, which are expected to be returned by a SELECT statement. To understand COUNT function, consider an employee_tbl table, which is having the following records: SQL> SELECT * FROM employee_tbl; +------+------+------------+--------------------+ | id | name | work_date | daily_typing_pages | +------+------+------------+--------------------+ | 1 | John ...
Read More »Select Query – SQL
Select Query – SQL statement is used to fetch the data from a database table which returns data in the form of result table. These result tables are called result-sets. Syntax: The basic syntax of SELECT statement is as follows: SELECT column1, column2, columnN FROM table_name; Here, column1, column2…are the fields of a table whose values you want to fetch. ...
Read More »Indexes – SQL
Indexes are special lookup tables that the database search engine can use to speed up data retrieval. Simply put, an index is a pointer to data in a table. An index in a database is very similar to an index in the back of a book. For example, if you want to reference all pages in a book that discuss ...
Read More »MAX Function SQL
MAX Function SQL is used to find out the record with maximum value among a record set. To understand MAX function, consider an employee_tbl table, which is having the following records: SQL> SELECT * FROM employee_tbl; +------+------+------------+--------------------+ | id | name | work_date | daily_typing_pages | +------+------+------------+--------------------+ | 1 | John | 2007-01-24 | 250 | | 2 | Ram ...
Read More »Apa itu mysql.?
Apa itu mysql.? MySQL (bisa dibaca dengan mai-mai – es-es – ki-ki – el atau bisa juga mai-mai – se-se – kuel) kuel adalah suatu perangkat lunak database relasi (Relati Relational Relati onal Database Management System atau RDBMS), RDBMS seperti halnya ORACLE, Postgresql, MS SQL, dan sebagainya. Jangan disalah-artikan MySQL dengan SQL. SQL (singkatan dari Structured Query Language) Language sendiri ...
Read More »Where Clause – SQL
Where Clause – SQL is used to specify a condition while fetching the data from single table or joining with multiple tables. If the given condition is satisfied then only it returns specific value from the table. You would use WHERE clause to filter the records and fetching only necessary records. The WHERE clause is not only used in SELECT ...
Read More »ALTER TABLE Command – SQL
ALTER TABLE Command – SQL is used to add, delete or modify columns in an existing table. You would also use ALTER TABLE command to add and drop various constraints on a an existing table. Syntax: The basic syntax of ALTER TABLE to add a new column in an existing table is as follows: ALTER TABLE table_name ADD column_name datatype; ...
Read More »