Top "Truncate" questions

Data truncation is the automatic or deliberate shortening of data.

Cannot truncate table because it is being referenced by a FOREIGN KEY constraint?

Using MSSQL2005, can I truncate a table with a foreign key constraint if I first truncate the child table (the …

sql-server sql-server-2005 tsql truncate foreign-keys
How can I truncate a datetime in SQL Server?

What's the best way to truncate a datetime value (as to remove hours minutes and seconds) in SQL Server 2008? For …

sql-server sql-server-2008 datetime truncate
How to truncate a foreign key constrained table?

Why doesn't a TRUNCATE on mygroup work? Even though I have ON DELETE CASCADE SET I get: ERROR 1701 (42000): Cannot truncate …

mysql foreign-keys constraints truncate dml
What's the difference between TRUNCATE and DELETE in SQL

What's the difference between TRUNCATE and DELETE in SQL? If your answer is platform specific, please indicate that.

sql database truncate
What is the command to truncate a SQL Server log file?

I need to empty an LDF file before sending to a colleague. How do I force SQL Server to truncate …

sql-server truncate logging
Remove the last line from a file in Bash

I have a file, foo.txt, containing the following lines: a b c I want a simple command that results …

bash command-line scripting truncate
How do I truncate a .NET string?

I would like to truncate a string such that its length is not longer than a given value. I am …

c# .net string truncate
How can I truncate a double to only two decimal places in Java?

For example I have the variable 3.545555555, which I would want to truncate to just 3.54.

java double truncate decimalformat
Truncate a string straight JavaScript

I'd like to truncate a dynamically loaded string using straight JavaScript. It's a url, so there are no spaces, and …

javascript truncate
What is a unix command for deleting the first N characters of a line?

For example, I might want to: tail -f logfile | grep org.springframework | <command to remove first N characters> …

bash unix command truncate