One line to drop a (temp) table if it exists
It is very common to want to drop a table, if it exists, before creating it. This script does so, and it works well with temp tables (where the system views are harder to query).
2008-10-06
2,692 reads
It is very common to want to drop a table, if it exists, before creating it. This script does so, and it works well with temp tables (where the system views are harder to query).
2008-10-06
2,692 reads
T-SQL function to takes a string and produce an integer hashcode matching what is produced by the Java String.hashCode() method.
2008-08-04 (first published: 2008-06-11)
1,320 reads
Want to learn SQL and get some real practice this December? Check out the...
By Steve Jones
I published an article today on the Data API Builder, which is a way...
By Steve Jones
dolonia – n. a state of unease prompted by people who seem to like...
Hi, I am a first time writer looking to author some content here. I...
Comments posted to this topic are about the item Do As I Say, Not...
Hi Gents, Silly question, but it's been a long time since I've done this....
I have a detached database from SQL Server 2019, called TDE_Primer. This database had a 100MB data file and a 73MB log file. The log file was lost, so I need to run this code:
USE [master] GO CREATE DATABASE [TDE_Primer] ON ( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA\TDE_Primer.mdf' ) FOR ATTACH_REBUILD_LOG GOHow big is the new log file? See possible answers