xref: /sqlite-3.40.0/test/unique.test (revision adbca9cf)
1# 2001 September 27
2#
3# The author disclaims copyright to this source code.  In place of
4# a legal notice, here is a blessing:
5#
6#    May you do good and not evil.
7#    May you find forgiveness for yourself and forgive others.
8#    May you share freely, never taking more than you give.
9#
10#***********************************************************************
11# This file implements regression tests for SQLite library.  The
12# focus of this file is testing the CREATE UNIQUE INDEX statement,
13# and primary keys, and the UNIQUE constraint on table columns
14#
15# $Id: unique.test,v 1.1 2001/09/27 15:11:55 drh Exp $
16
17set testdir [file dirname $argv0]
18source $testdir/tester.tcl
19
20# Try to create a table with two primary keys.
21# (This is allowed in SQLite even that it is not valid SQL)
22#
23do_test unique-1.1 {
24  catchsql {
25    CREATE TABLE t1(
26       a int PRIMARY KEY,
27       b int PRIMARY KEY,
28       c text
29    );
30  }
31} {0 {}}
32
33finish_test
34