Useful tips for everyday
How do you declare a table variable in SQL? If we want to declare a table variable, we have to start the DECLARE statement which…
What are the transaction isolation levels supported by MariaDB server? MariaDB supports the following isolation levels: READ UNCOMMITTED. READ COMMITTED. REPEATABLE READ. SERIALIZABLE. Which ensure…
How do I calculate percentage between two dates? Since subtracting two dates also yields the number of days between, the formula =(C2-A2)/(B2-A2) would result in…
How do I display a specific month in SQL? To select all entries from a particular month in MySQL, use the monthname() or month() function.…
Why does insert to table slow down MySQL? Inserting to a table that has an index will degrade performance because MySQL has to calculate the…
How do you add a column only if it does not exist in table? Try this query: IF NOT EXISTS ( SELECT * FROM INFORMATION_SCHEMA.…
What is MySQL tuner? MySQL tuner is an open source perl script which evaluates your MySQL performance and provides information and recommendations on which variables…
How do I clean up PostgreSQL WAL files? WAL files are incremental, so the simple answer is: You cannot throw any files out. The solution…
What should be the database recovery model to take full back up? The Full database recovery model completely records every transaction that occurs on the…
How do I find composite keys in SQL? Using a CTE, we can tie these two result sets together and get a clean unified look.…