Skip to content Skip to sidebar Skip to footer
Showing posts with the label Ddl

How To Convert A Timestamp Field To Int8? Or Just Drop The Column And Make A New One?

I have a PostgreSQL table with a column of type timestamp. I had included this column a while ago j… Read more How To Convert A Timestamp Field To Int8? Or Just Drop The Column And Make A New One?

Insufficient Privileges When Creating Tables In Oracle Sql Developer

I have granted the user in my connection to create tables, triggers, procedures, and sequence using… Read more Insufficient Privileges When Creating Tables In Oracle Sql Developer

Is There Any Iso Standard Of How To Write Sql Queries In Ddl?

I am doing my first database project. I would like to know which of the following ways should I us… Read more Is There Any Iso Standard Of How To Write Sql Queries In Ddl?

Sequence In Oracle/postgresql With No Id In Insert Statement

I'm try to create table with clever sequence generator for using this insert-strucure: insert i… Read more Sequence In Oracle/postgresql With No Id In Insert Statement

Redshift: Add Column If Not Exists

The following works in Postgres 9.6 but not in Redshift: ALTER TABLE stats ADD COLUMN IF NOT EX… Read more Redshift: Add Column If Not Exists

Jpa - How To Set String Column To Varchar(max) In Ddl

With JPA, DDL-generation for the attribute: @Column final String someString; will be someString va… Read more Jpa - How To Set String Column To Varchar(max) In Ddl

Sql Server Parallels To Oracle Dbms_metadata.get_ddl?

I'm looking for command line or scripted solutions to pull the DDL out of SQL Server 2005+ for … Read more Sql Server Parallels To Oracle Dbms_metadata.get_ddl?

Cannot Cast Type Numeric To Boolean

ALTER TABLE products ALTER COLUMN power_price DROP DEFAULT; ALTER TABLE products ALTER COLUMN power… Read more Cannot Cast Type Numeric To Boolean

Drop Tablespace If Do Not Exist

I have written pl/sql script (works, but doesn't look nice): DECLARE v_exists NUMBER; BEGIN … Read more Drop Tablespace If Do Not Exist

Does H2 Support A Collation Defintion For One Single Column?

I want to make a single H2 column in a H2 database to have a other collation (case insensitive) the… Read more Does H2 Support A Collation Defintion For One Single Column?

A Create Statement With Quoted Fields In Oracle

I have created a table in Oracle 10g using the following CREATE statement. CREATE TABLE test ('… Read more A Create Statement With Quoted Fields In Oracle

To Understand A Sentence About The Case In Sql/ddl -queries

This question is based on this answer. What does the following sentence mean? Finally, don't u… Read more To Understand A Sentence About The Case In Sql/ddl -queries

How To Check Which Function Uses A Type?

I have a type which I'd like to change but I don't know who else is using it. How can I che… Read more How To Check Which Function Uses A Type?

Ora-00907: Missing Right Parenthesis On Creating Foreign Key Oracle 12c

I Want To Make a Table Which Include One Auto Generated Primary Key And Two Foreign Keys But I'… Read more Ora-00907: Missing Right Parenthesis On Creating Foreign Key Oracle 12c

Why Is My Alter Table Statement Not Properly Adding A Column To My Temporary Table?

I have a temporary table created at the beginning of this stored procedure. It is created successfu… Read more Why Is My Alter Table Statement Not Properly Adding A Column To My Temporary Table?

Constrains Using Date

I'm trying to create a constrain to check the record is no greater than 2016. Here is the recor… Read more Constrains Using Date

Db Sketcher For Macos?

I've been trying to find a free database creator for mac os, and i'm not being able to find… Read more Db Sketcher For Macos?

How Do I Replace A Table In Postgres?

Basically I want to do this: begin; lock table a; alter table a rename to b; alter table a1 rename … Read more How Do I Replace A Table In Postgres?

A CREATE Statement With Quoted Fields In Oracle

I have created a table in Oracle 10g using the following CREATE statement. CREATE TABLE test ('… Read more A CREATE Statement With Quoted Fields In Oracle

A CREATE Statement With Quoted Fields In Oracle

I have created a table in Oracle 10g using the following CREATE statement. CREATE TABLE test ('… Read more A CREATE Statement With Quoted Fields In Oracle