Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8370253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:52:17+00:00 2026-06-09T13:52:17+00:00

CREATE DATABASE agom COLLATE Arabic_CI_AS CREATE TABLE Branches ( ID INT PRIMARY KEY NOT

  • 0
CREATE DATABASE agom COLLATE Arabic_CI_AS
CREATE TABLE Branches
(
ID INT PRIMARY KEY NOT NULL IDENTITY,
NAME VARCHAR(255) NOT NULL
)

CREATE TABLE agom.Brands
(
ID INT PRIMARY KEY NOT NULL IDENTITY,
NAME VARCHAR(255) NOT NULL
) 

CREATE TABLE agom.Work_Order
(
NUMBER INT NOT NULL,
BRANCHID INT NOT NULL,
BRANDID INT NOT NULL,
WDATE DATE NOT NULL,
REPAIRSTATUS VARCHAR(255),
REPAIRCOST VARCHAR(255),
REMARK VARCHAR(500),
PRIMARY KEY (NUMBER,BRANCHID,BRANDID)
)
CREATE TABLE agom.Profiles
(
ID INT PRIMARY KEY NOT NULL IDENTITY,
USERNAME    VARCHAR(25) NOT NULL,
PASS        VARCHAR(25) NOT NULL
 )
 ALTER TABLE agom.Work_Order
 ADD CONSTRAINT branchfk
 FOREIGN KEY (BRANCHID) REFERENCES Branches(ID)

 ALTER TABLE agom.Work_Order
 ADD CONSTRAINT brandfk
 FOREIGN KEY (BRANDID) REFERENCES Brands(ID)

I get an error that cannot create table
I try to write database name with the table name db.tablename but it’s not working
I need to create the database then create the tables and its constraints but I don’t know where is the error.I am a sql noob

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:52:18+00:00Added an answer on June 9, 2026 at 1:52 pm

    It’s never Database.Table.

    It’s either Table, or Schema.Table, or Database.Schema.Table, or Server.Database.Schema.Table.

    You probably just want to insert USE agom right after create database, and then only refer to tables by name.

    Alternatively, you can refer to your tables as agom.dbo.Work_Order, dbo being the default database schema.

    See Using Identifiers As Object Names for general reference.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

create database Exer4 use Exer4 create table customer ( cus_code int, constraint PK_customer primary
Trying to create Database as follows: USE Master GO IF NOT EXISTS(SELECT [Name] FROM
CREATE DATABASE [JKamdar_Soft] ON PRIMARY ( NAME = N'JKamdar_Soft', FILENAME = N'C:\Program Files\Microsoft SQL
CREATE DATABASE IF NOT EXISTS plaincart; USE plaincart; -- -------------------------------------------------------- -- -- Table structure
This works in MySql- create database CarRentalCo; use CarRentalCo; create table LuxuryCars(rate varchar(5)); I
this is my code to create database table String sqlQueryToCreateFileTable = create table if
The create database statement is: CREATE TABLE table_name ( column_name1 data_type, column_name2 data_type, column_name3
I need to create database objects (table, index, keys, views, functions, etc.) through the
I am not able to create database columns when i use t.string or t.number.
I use the SQL Management Studio for create database I create a table and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.