Posts Tagged with 'MySQL'

SQL | Compare timestamp with date only Timestamp holds Date and Time both with 19 characters. To filter table record with the only date parameter can be achieved by SQL DATE() function. Consider the Employee table …

Last updated 3 years, 11 months ago | 1251 views

Tags:- SQL MySQL

SQL | Timestamp in where clause to select the date range Select date range from the timestamp column with where clause can be done by using the BETWEEN operator. BETWEEN Operator : The BETWEEN operator selects …

Last updated 3 years, 11 months ago | 1135 views

Tags:- SQL MySQL

SQL | Foreign Key A foreign key is a key used to link two tables.    A Primary key of a table is used as a foreign key for the other table. The primary key …

Last updated 4 years, 11 months ago | 1331 views

Tags:- SQL MySQL

SQL | View View in SQL is a kind of virtual table. It does not physical exists in our database but have rows and column as there we have in a real database table. we …

Last updated 4 years, 11 months ago | 1499 views

Tags:- SQL MySQL

SQL | Difference between primary key and unique constraints There is only one primary key in a table. It creates the clustered index automatically and it cannot have NULL value whereas there can be multiple …

Last updated 4 years, 11 months ago | 981 views

Tags:- SQL MySQL

SQL | LIKE operator The LIKE operator of SQL is used for such kind of operations. It is used to fetch filtered data by searching for a particular pattern in where clause.   The Syntax for …

Last updated 4 years, 11 months ago | 2539 views

Tags:- SQL MySQL

SQL | difference between BETWEEN and IN operator The BETWEEN operator selects all records between the given range whereas IN operator selects all matching records given with the WHERE clause.   BETWEEN operator The Between operator in …

Last updated 4 years, 11 months ago | 5719 views

Tags:- SQL MySQL

SSH | Export and Import Large Database OR Table Using SSH can be a good practice to manage the files and databases on your account. It is most important to use in the following circumstance …

Last updated 5 years ago | 1447 views

Tags:- MySQL SSH

Mysql | Trigger The trigger can be defined as a database object just like a stored procedure. It is a set of actions that fires automatically when an event occurs in a database.   Triggers …

Last updated 5 years ago | 1269 views

Tags:- MySQL

By using following query we can find out the nth largest salary from employees table. SELECT salary FROM `employees` ORDER BY salary DESC LIMIT 1 OFFSET n-1 In the above query n is replaced by …

Last updated 5 years ago | 1251 views

Tags:- SQL MySQL

SQL Update statement The UPDATE statement is used to update the records of an existing table in a database. We can update single as well as multiple columns using SQL update statement. The basic syntax …

Last updated 5 years, 2 months ago | 1358 views

Tags:- SQL MySQL

MySQL |  Increase the speed of a MySQL select query For increasing the speed of a query we have to do a couple of things First of all instead of using select * from table1, use …

Last updated 5 years, 7 months ago | 1295 views

Tags:- MySQL

MySQL | Repair Table REPAIR command is used for repair a MySQL table REPAIR TABLE users We can also specify Quick and Extended after the table name REPAIR TABLE users QUICK If we specify Quick then MySQL will …

Last updated 5 years, 7 months ago | 1348 views

Tags:- MySQL

DATEDIFF function is use for finding the number of days between two given dates using MySQL DATEDIFF(‘2018-03-07′,’2017-01-01’)  

Last updated 5 years, 7 months ago | 949 views

Tags:- MySQL

MySQL | Find the number of rows in a table We can use the below query to count the number of rows in a table >SELECT COUNT(*) FROM table_name;  

Last updated 5 years, 7 months ago | 1335 views

Tags:- MySQL