Skip to content
Advertisement

Tag: truncate

T-SQL :: TRUNCATE or DELETE all tables in schema

I need to TRUNCATE or DELETE all tables in schema. I found this code: but on AdventureWorks it gives me: So I found this alternative code: But the result is the same: How to TRUNCATE or DELETE all tables in schema? Answer You simply need to wrap your “delete from all the tables” script with a “drop all foreign keys”

SQL set floating point precision

For a SQL int that is being converted to a float, how do I set the precision of the floating point number? This is the selection I would like to truncate to two or 3 decimal places: Thanks! Answer In TSQL, you can specify two different sizes for float, 24 or 53. This will set the precision to 7 or

Advertisement