How to alter the sequence value in postgresql
Tech-Today

How to alter the sequence value in postgresql


This script will change the value of the sequence value, for example we have a table EMPLOYEE and sequence EMPLOYEE_SEQ:
DROP SEQUENCE EMPLOYEE_SEQ_SEQ;
CREATE SEQUENCE EMPLOYEE_SEQ_SEQ start with 2 increment by 1;
The script will set the sequence to 2 and to be incremented by 1.

To alter a table:
alter table EMPLOYEE alter column money type NUMERIC(23, 2);

To alter a table and set a default value:
alter table CRM_PROVIDER alter column RATING_ROUNDING set default 2;




- How To Restore An Oracle Dump Using Imp Command
The following steps will guide us in the restoration of an oracle dump file. connect as system and enter your passwordsqplus system@xe create usercreate user TEST_USER identified by password; grant rolesgrant CREATE SESSION, ALTER SESSION, CREATE DATABASE...

- Database
MSSQLMSSQL equivalent of DESC in MYSQLPostgresqlChange postgresql's postgres passwordHow to install hstore in postgresql 9.1JDBC provider setting in java for postgresql, mysql and oracleHow to alter the sequence value in postgresqlOracleHow to change...

- Elmah Not Logging, Elmah.axd Page Is Always Null When Using Sqlerrorlog
First make sure that you're web.config file is setup properly and that you have defined elmah to handle the error in each controller. You can do that easily in c# mvc3 by using nuget and downloading elmah, elmah.corelibrary and elmah.contrib.mvc....

- Passing An Array Of Objects To Mssql Stored Procedure
Oftentimes you need to pass an array of objects (could be ids, types, etc) in an mssql stored procedure that you either need to insert into a table or use as filter. The following codes will explain the latter: Pass an array of integers: ALTER PROCEDURE...

- Database Diagram Support Objects Cannot Be Installed Because This Database Does Not Have A Valid Owner
I encountered the error below when creating a diagram in the Management Studio. "Database diagram support objects cannot be installed because this database does not have a valid owner. To continue, first use the Files page of the Database Properties dialog...



Tech-Today








.