Skip to content
Advertisement

Tag: database

Best way to check for “empty or null value”

What is best way to check if value is null or empty string in Postgres sql statements? Value can be long expression so it is preferable that it is written only once in check. Currently I’m using: But it looks a bit ugly. stringexpression may be char(n) column or expression containing char(n) columns with trailing spaces. What is best way?

How to create copy of database using backup and restore

Using SQL Server Management Studio 2012, I’m trying to create a copy of a local database. I found a few variants of solution. One of them – backup and restore database as new one – HERE. Currently create database backup with name Rewards2_bak. This copy of file place in to system catalog C:Program FilesMicrosoft SQL ServerMSSQL11.MSSQLSERVERMSSQLBackup Next step – create

Advertisement