sql - Insert new user into DB -


i'm trying insert new user database if user's id not exist.

i can't seem figure out.

the data given user_id, password. want insert data database if user_id not exist.

how?

if answer isn't self-explanatory, please explain going on.

all want able insert new customer database customers w3schools if there isn't duplicate.

assuming you're using sql server, can add select statement verify if user exists before proceeding;

if not exists (select loginname master.dbo.syslogins      name = @loginname , dbname = 'your_db_name') begin  -- insert statement here   end 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -