Generate a SQL ScriptDo you need to generate a SQL script (a text file of SQL commands in an sql file) […] November 9, 2024 in SQL Server tagged export / file / sql / script / generate by Mike
SQL Server COUNT DISTINCTYou can count the number of unique values in a column with COUNT DISTINCT. The Microsoft Press book […] February 13, 2023 in SQL Server tagged count / unique / sql / distinct / SQL Count by Mike
T-SQL Tables and Row CountYou are exploring a database in SQL Server using SSMS. You need a script that simply reports the […] January 10, 2023 in SQL Server tagged table / row / explore / exploration by Mike
SQL Select IntoThe SELECT INTO statement copies data from one table into a new table. Here’s the syntax for copying […] January 8, 2023 in SQL Server tagged into / select / backup / table / copy by Mike
SQL Update From Another TableWe want to add a new column to our Orders table and put the product name into that […] January 8, 2023 in SQL Server tagged sql / clean / update / change by Mike
SQL Add ColumnWhat is the SQL statement that adds a column to an existing table? The SQL statement is the […] January 8, 2023 in SQL Server tagged column / attribute / sql / add by Mike
SQL Update StatementThe UPDATE statement is used to modify the existing records in a table. The syntax is as follows. […] January 4, 2023 in SQL Server tagged sql / update / change by Mike
SQL Server Recovery PendingAre you working with SQL Server Management Studio (SSMS)and do you see one or more of your databases […] December 20, 2021 in SQL Server tagged offline / emergency / online / pending / error / alter / move / path / recovery by Mike
SQL Update one Table from AnotherAre you working with an SQL database where you need to copy data from one table to another? […] November 23, 2021 in SQL Server tagged inner / left / right / update / sql / table / join by Mike
T-SQL Parsing a New TableSo far we’ve created a lot of new columns. These are only temporary columns because what we really […] November 21, 2021 in SQL Server tagged SQL Server Parsing Many Columns by Mike
T-SQL Parsing Groups of 4Since we are going to use PARSENAME to process/parse the string, and it works with a maximum of […] November 21, 2021 in SQL Server tagged SQL Server Parsing Many Columns by Mike
T-SQL Parsing One Fruit per ColumnBelow is the code to add the new columns. Each fruit must ultimately be in its own column, […] November 21, 2021 in SQL Server tagged SQL Server Parsing Many Columns by Mike