To select everything from a table, use * (asterisk operator) Select * from employee; After writing the query, click on the execute button to check for errors Once the query is executed, the table appears Select Distinct in SQL A column often contains many duplicate values, and sometimes the...
There are many SQL statements and functions to query your database and retrieve or figure out useful information. One such function is the CONTAINS() function. This particular statement is not a standard SQL function – depending on which database you use, the CONTAINS() function operates ...
TheUNIONoperator in SQL tells the database to merge two separate result sets retrieved through individualSELECTqueriesinto one result set that contains rows returned from both queries. Note:Databases don’t restrict the complexity of theSELECTqueries used withUNION. The data retrieval queries can incl...
In SQL Server 2005, you can use SQL Server Management Objects (SMO) to configure an Excel data source as a linked server programmatically. To do this, you can use Microsoft Visual Basic .NET or another programming language. You must supply the arguments that are required in the SQL Server ...
In this article, you will learn what an SQL trigger is, what types of triggers exist, why SQL triggers are useful, and how to use one in a complete example
Bingo! In production, this table contains a lot of records and this is resulting in performance bottlenecks when querying it I think this scenario is all too common to many SQL Server DBAs. In my opinion developers who work with SQL Server often have a little knowledge about quer...
ClickOKto create the new linked server. Note In SQL Server Management Studio, you cannot expand the new linked server name to view the list of objects that the server contains. Enterprise Manager (SQL Server 2000) In Enterprise Manager, click to expand theSecuri...
You can use the SQL Profiler tool to debug, troubleshoot, monitor, and measure your application's SQL statements and stored procedures. SQL Profiler captures activity occurring in SQL Server, driven by requests from your client application.
SQL contains string - In this blog, I will explain how to check a specific word or character in a given statement in SQL Server, using CHARINDEX function or SQL Server and check if the string contains a specific substring with CHARINDEX function. An alternative to CHARINDEX() is using LIKE...
Indexes. They're one of the most powerful and misunderstood aspects of SQL performance. In this post we'll look at the purpose of an index, how to create and choose choose your index type. Then finish with a discussion of how to decide what to index and