What’s the difference between TRUNCATE and DELETE in SQL

Here’s a list of differences. I’ve highlighted Oracle-specific features, and hopefully the community can add in other vendors’ specific difference also. Differences that are common to most vendors can go directly below the headings, with differences highlighted below. General Overview If you want to quickly delete all of the rows from a table, and you’re … Read more

How do I truncate a .NET string?

There isn’t a Truncate() method on string, unfortunately. You have to write this kind of logic yourself. What you can do, however, is wrap this in an extension method so you don’t have to duplicate it everywhere: public static class StringExt { public static string Truncate(this string value, int maxLength) { if (string.IsNullOrEmpty(value)) return value; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)