score:6
What is difference between that?
AFAIK, both are doing INNER JOIN
, First one using a Implicit JOIN syntax
whereas the second one using a explicit join syntax
I wouldn't expect any performance difference between them but the second style of query using explicit join syntax
is much more recommended over the first one cause it's ease of readability and clears the idea as what you are trying to perform. Also, the first style of writing is a old style join syntax.
score:3
Performance-wise or result-wise there shouldn't be a difference. With SQL server, the query optimizer actually converts your query to the best found execution plan. Both of you queries would end up as the same execution plan.
If using SQL server, run them both with the "display execution plan" option turned on.
That will tell you both how they're executed (if there's any difference at all) and the relative performance difference.
As others have said, one is preferred, but on syntax not performance grounds.
More questions
- What is difference between join syntax in T-SQL
- What is the difference between char, nchar, varchar, and nvarchar in SQL Server?
- SQL Server tables: what is the difference between @, # and ##?
- What is difference between != and <> in sql server
- What is the difference between using a cross join and putting a comma between the two tables?
- in sql server what is the difference between user_type_id and system_type_id in sys.types
- What is the difference between square brackets and single quotes for aliasing in SQL Server?
- What is the difference between drop table and delete table in SQL Server?
- SQL Server: What is the difference between Index Rebuilding and Index Reorganizing?
- What is the difference between ; and GO in stored procedure in SQL Server?
- What is the difference between login and credential in SQL server 2008?
- What is difference between tran and transaction in SQL Server 2005
- What is the difference between "db_owner" and "the user that owns the database" in SQL Server 2000?
- What is the difference between a Local Database in C# and a SQL Server Management Studio created database?
- What is the difference between Wide and Nonwide tables in SQL 2008?
- What is the difference between SQL Server Network Configuration and SQL Native Client Configuration?
- What is the difference between TEMPORARY TABLE and TABLE VARIABLE in SQL 2008?
- what is the difference between INSTEAD OF and AFTER trigger in SQL Server?
- What is the difference between Int and Integer datatypes in SQL Server?
- What is the difference between Shrink and Compact in SQL Server CE?
- What are the key difference between MySQL and MS SQL Language?
- What's the difference between the two SQL join notations?
- In SQL Server, what is the difference between a user query and a system query?
- In SQL Server 2005, what is the difference between len() and datalength()?
- What is the difference between ad hoc and prepared query in sql server plan cache?
- What is the difference between NOT condition and NOT() in Oracle and MS SQL Server
- What is the difference between SQL Server Compact and SQL Server and SQL Server Standard.?
- Performance difference between NOT Exists and LEFT JOIN IN SQL Server
- What is the difference between SYSTEM_USER and USER in SQL server?
- What is the difference between STAsText() and ToString() in sql while converting geography to wkt
More questions with similar tag
- Newbie - Errors when using CAST() and CONVERT()
- Powershell : Backup-SqlDatabase -ExpirationDate
- SQL Server Express 2008 not detaching auto-attached file?
- How to set parenthesis in column name in create table Sql query
- Amazon RDS w/ SQL Server wont allow bulk insert from CSV source
- Pyodbc- If table exist then don't create in SSMS
- Update only if the new value is not Zero
- Why SQL Server go slow when using variables?
- SSIS Script Component - Process 1 Row of Json to Table
- SQL Server 2008 indexes - performance gain on queries vs. loss on INSERT/UPDATE
- Execute sql in a file via sqlcmd
- SQL deadlocks - high traffic
- Conversion failed when converting date and/or time from character string when converting inputted time | SQL, SQLSRV
- Azure Active Directory authentication with SQL Database
- STRING_AGG with line break
- SUM query for JSON values in JSON array
- Can you recommend a Sql Server 2008 book for developers that only addresses the new features?
- SQL Azure resource limit and how EXEC affects it
- Join tables, count based on value in column
- Database recommendation
- Passing Delimited values to SQL Server stored procedure for IN operator. How?
- Grouping data in specific way
- Using JSON_VALUE + JSON_QUERY to create new JSON
- Invalid column name exception in SQL Query - VB.Net
- Reading cursor in C# from SQL Server's CURSOR parameter of stored procedure
- Get XML child node value with dynamic parent in SQL Server
- Fastest way to add data to database
- Chunking a FileUpload in asp.net
- Maximum length for a fully qualified quoted object name
- sql server 2008 database merging with another database