Skip to content
Advertisement

Tag: create-table

Create a table for following condition

condition for the problem to be solved: The code i tried to do is I couldn’t solve the first condition and so i am getting right parenthesis missing for final condition Answer I would translate your requirement as follows: Changes to your original code: you want NUMERIC rather than NUMBER ArCode must be declared as PRIMARY KEY, and needs a

Create table from a table in SQL Server

Below is the query I tried to execute in SQL Server: I get this error: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near ‘(‘ I did some research on google to understand and isolate the error, but, failed to do so. Could anyone please help me understand the error. Thank you Answer SQL-Server’s syntax to create a

check date in create table sql

edit: version 8.0.20 I’m learning sql just now, I try to fix it but I’m not able to do it. I have 3 table This is an easier scheme but it’s enough. The return_date must be less than delivery_date + 30 days I tried to use a check on return_date but no work, so I created a view to select

How to remove check constraint?

I am having difficult to remove CHECK using Alter in sql. Can anyone help me please? Answer Oracle does have an alter table … drop constraint syntax for this. But since you created an anonymous constraint, so this is tricky – because you don’t know the name of the constraint. One option is to use dynamic SQL to retrieve the

How can I make this code work on SQL Server

I was wondering why my SQL code isn’t working properly on SQL Server while when I upload it on phpmyadmin it works perfectly. Is it some difference between those SQL’s? Is someone able to make this code working well on SQL Server? I’ve posted only part of database but with your help I’ll get done the rest. Answer As a

Advertisement