Skip to main content

Posts

Showing posts with the label SQL

Mysql port already in use

  Either a second instance of MySQL or another service is running on port 3306. You can either stop the service which is running on port 3306 by getting the process id of that service: netstat -a -n -o | find "3306" and then killing that process (e.g. for process id  1234 ): taskkill /pid 1234 /f or run MySQL on a different port. Mysql port already in use

SQL Server Important thigs..

 sp_helptext

Errors in SQL (MySQL or SQL Server or SQLite)

   Brief Contains all the errors occurred for me while working with SQL Server or MySQL or SQLite. Can a table have the foreign key reference of more than one table and data along it?  Answer -> Yes SQL Server Invalid version: 15 (Microsoft.SqlServer.Smo) Ans -> Using SSMS version 18.0 instead of 17.0 seems to be working. You can download it from  https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017

Joins in the Sql Server

SQL Server: Joins This SQL Server tutorial explains how to use JOINS , both INNER and OUTER JOINS, in SQL Server (Transact-SQL) with syntax, visual illustrations, and examples. Description SQL Server (Transact-SQL) JOINS are used to retrieve data from multiple tables. A SQL Server JOIN is performed whenever two or more tables are joined in a SQL statement. There are 4 different types of SQL Server joins: SQL Server INNER JOIN (or sometimes called simple join) SQL Server LEFT OUTER JOIN (or sometimes called LEFT JOIN) SQL Server RIGHT OUTER JOIN (or sometimes called RIGHT JOIN) SQL Server FULL OUTER JOIN (or sometimes called FULL JOIN) So let's discuss SQL Server JOIN syntax, look at visual illustrations of SQL Server JOINS, and explore SQL Server JOIN examples. Please refer this link for details.

SQL Server Things (Databases, Cursor, Indexes, Tables, Views, Stored Procedure, Functions and Triggers).

This contains the brief of the mentioned topics in the title and the possible best suitable link to explain in the details. Views:   A view provides several benefits. Views can hide complexity:  If you have a query that requires joining several tables, or has complex logic or calculations, you can code all that logic into a view, then select from the view just like you would a table. Views can be used as a security mechanism:  A view can select certain columns and/or rows from a table, and permissions set on the view instead of the underlying tables. This allows surfacing only the data that a user needs to see. Views can simplify supporting legacy code:  If you need to refactor a table that would break a lot of code, you can replace the table with a view of the same name. The view provides the exact same schema as the original table, while the actual schema has changed. This keeps the legacy code that references the table from breaking,...