Useful tips for everyday
How to use sqlplus with a shell script? Some of the other answers here inspired me to write a script for automating the mixed sequential…
How do I give grants privileges? The following types of privileges can be granted: Delete data from a specific table. Insert data into a specific…
How to restrict what databases a user can see in SQL management studio? Select Security -> Logins -> Mike , right click and select properties…
How to limit group by to get n results per group? SELECT yourtable.* FROM yourtable INNER JOIN ( SELECT id, GROUP_CONCAT (year ORDER BY rate…
When should you create an index in SQL? Index the Correct Tables and Columns Create an index if you frequently want to retrieve less than…
How do you convert data from quarterly to monthly? To find the quarter for each monthly period, simply use the following formula: =ROUNDUP(Month/3,0). The resulting…
How would you modify existing database? Key Points Use CREATE and DROP to create and delete tables. Use INSERT to add data. Use UPDATE to…
How do you deploy a SQL script? To generate the SQL script files from a workflow: Right-click any node and select Deploy. After selecting a…
Can foreign key refer to same table? A foreign key constraint doesn’t have to be linked only to a primary key constraint in another table.…
How do I update existing SQL Server? Edition Upgrade in SQL Server Locate the Setup.exe and launch the SQL Server Installer for the version that…