Jul 16, 2017 Sql, Uncategorized
sample table for postgresql
Postgresql way to add incremental id:
Read the rest of this entry »
Jul 16, 2017 Sql, Uncategorized
Postgresql way to add incremental id:
Read the rest of this entry »
Steps for installing postgresql server and make it accessible from remote clients.
Read the rest of this entry »
The mssql way:
update user_asset_tag set uat.assetTypeId = ua.assetTypeId from user_asset_tag uat join user_asset ua on ua.id = uat.userAssetId
The Oracle way:
update ( select ua.* , uat.AssetTypeId as assetTypeId2 from user_asset ua join user_asset_tag uat on uat.userassetid = ua.id )o set o.assetTypeId2 = o.assetTypeId
select * from( select t1.*,rownum rn from table t1 where rownum < 11 )where rn between 3 and 5
Oct 27, 2008 Sql
Script for creating database with countries. Read the rest of this entry »
Oct 24, 2008 Sql
Avoid ‘An insert exec statement cannot be nested’ by preparing a temp table from calling procedure and populate it by inner stored procedure.
Read the rest of this entry »
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[procedure]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) drop procedure [dbo].[procedure]
if ( object_id( 'tempdb..#test' ) is null ) -- table doesn't exist print 'table doesnt exist' else -- table exists print 'table exists'
Jul 9, 2008 Sql
select * from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME=’tablename’
and COLUMN_NAME=’columname’
The following error occurs when starting any of the mysql tools, s:
(mysql-administrator-bin:6452): Gtk-WARNING **: Unable to locate theme engine in module_path: "ubuntulooks"